Hello Gerd,

Historians believe that Wed, 31 Jan 2001 at 16:26 GMT +0100 was when,
Gerd Ewald [GE] typed the following:

<snip>

GE> Wow, being mentioned in the subject with the king of regex is quite an
GE> honour, isn't it?

I hope you're not serious.  I would hate to think that any type of
hierarchy existed amongst the membership.

>> %REGEXPMATCH returns Subpattern 1 if not empty, otherwise it
GE>                                                   ^^^^^^^^^^
>> returns subpattern 0.

GE> Another thing learned! Didn't know that.

Yep, the the same thing applies to regexps in the editor find/replace
tool.

<snip>

>> <template>
>> %SETPATTREGEXP="^(.*)(@)(.*)$"%REGEXPBLINDMATCH="%OFROMADDR"
GE>                      1  2   3
GE> Januk, there are only three subpatterns (plus SP 0) while you listed SP4 as
GE> well. Was it to show that subpattern 4 is empty or is there another reason?

Nope, no other reason.  Just showing what happens.  Actually, it is
interesting to see what happens if you put in some option settings.
Try changing the regexp to:

"(?i)^(.*)(@)(.*)$"

Actually, this is also an interesting example to try the ungreedy
settings.  Try the following regexps in this template as well:

"(?i)^(.*?)(@)(.*?)"
"(?i)(.*?)(@)(.*?)$"
"(.*)(@)(.*)"
"(.*?)(@)(.*?)"


-- 
Thanks for writing,
 Januk Aggarwal

 Using The Bat! 1.49c under Windows 98 4.10 Build 2222  A

 With these words, this page is no longer blank but is complete.

-- 
______________________________________________________
Archives   : <http://tbtech.thebat.dutaint.com>
Moderators : <mailto:[EMAIL PROTECTED]>
Unsubscribe: <mailto:[EMAIL PROTECTED]>

You are subscribed as : [email protected]


Reply via email to