Riddle me this: grep / regx experts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

BUT!!!
# 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 newbury@xxxxxxxxxxxx
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux