NET Regular Exp patterns work in VB6?

  • Thread starter Thread starter Thiru.net
  • Start date Start date
T

Thiru.net

Hi, Will .NET Regular Exp patterns work in VB6? ex: reg exp pattern
for email in .net \w+([-+.']\w+)*@\w+([-.]\w+)*\­.\w+([-.]\w+)* Will
this work if i use it in vb6? Anybody has idea about it. Please
comment on this. Thanks, Thiru.S
 
Hello Peter Ritchie [C# MVP],
Not without work.

You could use JScript regular expressions:
http://www.regular-expressions.info/vb.html

Otherwise, you would to wrap the Regex class from .NET in a COM object
that could be used from VB6.

There are a lot of Regular Expressions that should 'just work' especially
if you set the ECMAScript option on the .NET regex object. That way it uses
the same syntax as used by Javascript/JScript/VBScript, so that way chances
of problems are pretty slim.

If you do not specify that option, then the .NET variant is a lot more powerful,
though these advanced features aren't used that often. Mostly people have
a hard enough time understanding normal regex to begin with.


Jesse
Hi, Will .NET Regular Exp patterns work in VB6? ex: reg exp pattern
for email in .net \w+([-+.']\w+)*@\w+([-.]\w+)*\­.\w+([-.]\w+)* Will
this work if i use it in vb6? Anybody has idea about it. Please
comment on this. Thanks, Thiru.S
 
Back
Top