
"John Maddock"
Roger Leigh wrote:
I expect both regular expressions here to match with the value string. They certainly to with egrep. However, I only get the second to match:
Am I correct in my expectation that expression1 will match? If not, what should I be doing to make it match?
Use regex_search. regex_match will only succeed if the expression matches *all* of the string, regex_search will *find* a sub-string that matches.
Ah, that's just what I needed. It works perfectly. Thank you all for your help! Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.