regular expression -- caseless

Oct 18, 2008
339
2
Hello -- Is there a way to specify in a regular expression template
that the match is case neutral?

with grep there is the -i switch and PCRE does allow switches to be
specified with the template. My goal is to match

foo

in a string -- I don't case how its cased
 
May 20, 2008
11,415
99
Syracuse, NY, USA
On Wed, 10 Aug 2011 00:53:49 -0400, fpefpe <> wrote:

|Hello -- Is there a way to specify in a regular expression template
|that the match is case neutral?

That depends on the regex syntax you've chosen (OPTION). With the PERL syntax,

Code:
v:\> echo %@regex[(?i)foo,FOO]
1

v:\> echo %@regex[foo,FOO]
0
 
Oct 18, 2008
339
2
On Wed, 10 Aug 2011 00:53:49 -0400, fpefpe <> wrote:

|Hello -- Is there a way to specify in a regular expression template
|that the match is case neutral?

That depends on the regex syntax you've chosen (OPTION). With the PERL syntax,

Code:
v:\> echo %@regex[(?i)foo,FOO]
1

v:\> echo %@regex[foo,FOO]
0


Thanks -- That is the way the PCRE api works too

Frank
 

ron

Aug 19, 2008
151
0
On Wed, 10 Aug 2011 00:53:49 -0400, fpefpe <> wrote:

That depends on the regex syntax you've chosen (OPTION). With the PERL syntax,

Code:
v:\> echo %@regex[(?i)foo,FOO]
1

v:\> echo %@regex[foo,FOO]
0

Thanks for that tip, something I was looking for and works nicely. But, Is that PERL? Looks like Onigmo.
 
Similar threads
Thread starter Title Forum Replies Date
D How to? Use regular expression with REN? Support 2
R v25 Regular Expression Analyser Support 2
rps Documentation Regular expression syntax link broken Support 1
M How to? Do a particular regular expression... Support 8
JohnQSmith Regular expression groups Support 15
A How to? filter text stream with a regular expression Support 11
Phileosophos Can FFIND match file names with a regular expression? Support 19
nickles Regular expression FOR/DIR Support 2
Jesse Heines Using Regular Expressions with the REN commanc Support 8
mikea How to? Regular expressions in TCC Support 6
vefatica FFIND and multi-line regular expressions Support 4
vefatica Regular expressions? Support 12
T FOR command and regular expressions Support 19
Steve Pitts How to? FFIND, regular expressions and double quotes Support 4
vefatica Regular expressions in FOR's set? Support 10
vefatica DIR and regular expressions Support 0
T DEL disregards switch when using regular expressions Support 2
C searching history and regular expressions Support 5
vefatica SET /A var=expression=digits Support 3
D conditional expression: force numeric Support 6
D Catching the result of an evaluated script expression Support 0
WadeHatler Fixed Breaking change in Expression evaluation (.and.) in v17 Support 6
Joe Caverly Conditional Expression Test of @SFN Support 4
cgunhouse Trouble with Relational Expression Support 4
M Just a verification regarding "Iff" and both "status test(s)" and "relational expression(s)"... Support 3
B @PERL[expression] definition? Support 2

Similar threads