LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Regular Expression Conditionals (?(if)then|else) in VBA?

Does the VBScript_RegExp_55.RegExp object support conditionals?

According to http://www.regular-expressions.info/refflavors.html .NET allows
for conditionals using the (?(if)then|else) structure, and I thought that the
VBScript RegExp object used the .NET flavor of RegEx. But when I try to use
it, the object returns an error message.

When I try to do the following:
objRegExp.Pattern = €œ^(<)?test(?(1)|)$€
I get the following error message:
Method 'Test' of object 'IRegExp2' failed

I am trying to use RegEx conditionals to ensure that a string with an
opening bracket has a closing bracket. So the RegEx above would accept €œtest€
or €œ<test€, but it would not accept €œ<test€ or €œtest€.

I have looked all over for documentation on the VBScript=RegExp_55.RegExp
flavor of RegEx, but have had little success.

Any help would be greatly appreciated.

Thank you.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone help me with this regular expression? [email protected] Excel Discussion (Misc queries) 3 March 10th 09 07:36 PM
Help with regular expression PO Excel Programming 3 May 2nd 07 01:39 PM
Regular Expression sl Excel Discussion (Misc queries) 2 January 23rd 07 11:57 PM
Regular Expression for cell address M. Authement Excel Programming 11 January 4th 07 08:57 PM
Regular expression searching problem LarryLev Excel Programming 0 September 15th 05 07:44 PM


All times are GMT +1. The time now is 08:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"