in reply to Regular expression with capture following a match
"speed \\w+\"
I don't see how that 'regexp' could capture 'speed'. It only will match successfully if the string contains the literal text "speed\w". That's because you've got a double-backslash in front of the 'w', so it's not functioning as a metacharacter, but rather as a literal character.
As for a regexp that will capture whatever comes after 'speed', how about...
m/speed(.+)/
The regular expression could be made more specific as to what it captures if you define for us what part of the string following 'speed' constitutes "the value next to 'speed'".
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regular expression with capture following a match
by ramya2005 (Scribe) on Oct 03, 2005 at 17:14 UTC | |
by davido (Cardinal) on Oct 03, 2005 at 19:45 UTC |