LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Regular Expressions (https://www.linuxquestions.org/questions/linux-software-2/regular-expressions-196945/)

overbored 06-23-2004 04:54 PM

Regular Expressions
 
I'm wondering if there's a complete and accurate reference for all the various regular expressions in programs like sed, perl, grep, emacs, etc. Currently I just use Google, which usually brings up something that is inaccurate or talks about very basic/general regex. For instance, I'm confused as to why \w matches underscores _ in sed. This is very frustrating, and I haven't found a single resource that describes this. Thanks in advance for any help.

ToniT 06-23-2004 05:15 PM

'man 7 regex' is quite clear.

overbored 06-24-2004 01:20 PM

\w is nowhere in that man page. It only specifies that word boundaries (which aren't even given as \b but [[:<:]] and [[:>:]]) include :alnum and underscores.

ToniT 06-24-2004 02:34 PM

Well, the corresponding info page has some more information ('info regex' or other mirror)

eg. \w is mentioned in info page


All times are GMT -5. The time now is 06:54 PM.