There is an example in this link about
To delete the first number on all lines that start with a "#" use:
sed '/^#/ s/[0-9][0-9]*//'
What is the benefit of first pattern(
/^#/)? It could be simply:
The general format of
When a command has a single address, it operates on all lines that match that address. When a command has no address, it operates on every single line.
Regarding your specific examples:
The first will match and substitute:
The second will not.
Plus, the second will also remove the initial