Simple (i thought) match

4 views
Skip to first unread message

Working Stiff

unread,
Aug 15, 2011, 3:43:04 PM8/15/11
to Regex
Hello. I'm a newcomer who is stuck with what I thought would be a
simple regex.

I have a line of text:

Name=Rex, Frank, Clark

I want my regex to match "Rex" "Frank" and "Clark".

I thought I could just use (\w+) and an additional pattern to exclude
"Name", but I can't find a working method.

Any takers?

eugeny....@gmail.com

unread,
Aug 18, 2011, 5:03:49 AM8/18/11
to Regex
my suggestion
^\x20*(?<=Name=).*$

but whay bother with regex?
Take incoming line, left-trim "name=" and pick the remainder!

Eugeny

Eugeny Sattler

unread,
Aug 18, 2011, 5:14:22 AM8/18/11
to Regex
> ^\x20*(?<=Name=).*$

to be more exact ,
(?<=^\x20*Name\x20*=\x20*).*$

(with "dot matches newlines" set to OFF)

Reply all
Reply to author
Forward
0 new messages