Internet technologies and communication software



RESOLVED: Need help with regular expression
Search  Users  Rules 
Close
Login:
Password:
Forgot your password?
Register
Login
 
Pages: 1
RSS
RESOLVED: Need help with regular expression, I don't understand RegExpBlindMatch=
 
This is my expression:

^(\w+\b.*?){3}

It returns the first three words.

This expression works great, but I want to use what is returned in my macro.

Right now my macro returns the word after the expression.

For example:

This is my string:

Jason Matthew Gottschalk commented on your status:
This expression: ^(\w+\b.*?){3} returns Jason Matthew Gottschalk

Here is my Macro:

%SetPattRegExp="^(\w+\b.*?){3}"%-
%RegExpBlindMatch="%Text"%-
%SubPatt="2" %SetPattRegExp="(?is)(.*?)status:\s\n(.*?)\n"%-
%RegExpBlindMatch="%Text"%-
%SubPatt="2"
%ModifyOnce("Subject")%-
%Subject="FB Comment"%-

It should return:
Jason Matthew Gottschalk
Blah Blah Blah

But it returns:
<blank line>
Blah Blah Blah



How do I get the macro to return the first three words of the string?

Thanks,
Jason
Edited: Jason Gottschalk - 28.01.2009 03:51:04
 
Changed %SubPatt="2" to %SubPatt="0"

Also, Found THIS site to be VERY helpful with RegExp:
http://gskinner.com/RegExr/
Pages: 1
Users browsing this topic (1 guests)