RegExp Lazy Quantifiers
Posted: Mon Mar 30, 2015 7:30 pm
Is there a way to do a lazy quantifier in Switch using .*?
When I try to isolate the value "Some Value" from the string below using the lazy quantifier .*? I don't get any match.
I could split the string on " / ", but do lazy quantifiers not exist in Switch's RegExp Engine?
Thanks.
Jim
When I try to isolate the value "Some Value" from the string below using the lazy quantifier .*? I don't get any match.
Code: Select all
var str = 'Some Value / Some Other Value / Yet Another Value /';
re = /(.*?)\s\//;
job.log (-1, re.search(str) );
job.log (-1, "cap: " + re.cap(0) );
Thanks.
Jim