A bug in regx handling???

I am cleaning up some html code, using sed to standardize the formatting. I was searching for specific instances of code to amend using grep.
I was looking for instances like  <a name="s1s1">
Example text in a file: ( here named, quite originally, temp )
<p class="section-f"></a><a name="s8"></a>8.</b></a>

And # grep -h '[0-9]s[0-9]*">' temp
Returns nothing (which is the expected result: there are no [0-9]s[0-9}"> instances.

# grep -h '[0-9]*s[0-9]*">' temp
Returns the example line with the 's[0-9]">' highlighted.

Note that the character before the 's' is either " or #

Can anyone explain what is happening?. This isn't politics so the group [0-9] should not equal [0-9"#]. Or even [0-9\"\#].

             R. Geoffrey Newbury                        
             954 Owenwood Drive
         Mississauga, Ontario, L5H 3J2

      t905-271-9600 newb...@mandamus.org
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org

Reply via email to