Page 1 of 1

VBScript RegEx Lib compared to TextCrawler?

Posted: Tue Apr 28, 2009 3:35 am
by Liz
Hello DV Support:

Thank you for TextCrawler.

1. TextCrawler's instructions say "TextCrawler implements VBScript / JavaScript ECMA-262 regular expressions." When I look at the features available through VBScript RegEx, there are more than are listed in TextCrawler's instructions. What features, if any, are available in TextCrawler that are not listed in TextCrawler's Instructions?

2. In particular, there is a feature in VBScript RegEx to add non-greediness by adding the character ? . Is this feature available in TextCrawler? I would like not having to use the method e.g. [^"]*" for non-greediness.

MS says about ? : "When this character immediately follows any of the other quantifiers (*, +, ?, {n}, {n,}, {n,m}), the matching pattern is non-greedy. A non-greedy pattern matches as little of the searched string as possible, whereas the default greedy pattern matches as much of the searched string as possible. For example, in the string "oooo", 'o+?' matches a single "o", while 'o+' matches all 'o's. "

Thank you,
Liz
.

Posted: Tue Apr 28, 2009 10:20 am
by Dv
Yes, VBscript 5.5 supports this, and works in textcrawler -

Text- <b>hello</b>blah blah <b>there</b> you.
Regex- <b>.*?</b>
Result-
1) <b>hello</b>
2) <b>there</b>

Without the non-greedy character-
RegEx- <b>.*</b>
Result -
1) <b>hello</b>blah blah <b>there</b>


I need to update the documentation to reflect the newer features of vbscript 5.5

Posted: Tue Apr 28, 2009 4:22 pm
by Liz
Hello Dv Support:

Thank you for your response (and for its speed).

Your answer is great news.

1. Are there any features of VBScript 5.5 that do not work in TextCrawler?

2. What website(s) do you recommend as a reference for syntax of VBScript 5.5 regex? (On MS website I've only found pages for higher versions of VBScript.)

Thank you,
.

Posted: Fri May 08, 2009 3:35 pm
by DV
All VBScript 5.5 features should work in TC.

This site has some good details on 5.5-
http://www.regular-expressions.info/vbscript.html