Non-greedy regex captures

SyntaxEditor for Windows Forms Forum

Posted 18 years ago by Marianne
Avatar
For switching from HTML to VBScript, I have a lookahead defined like this (it's similar to the one in your sample but account for additional spaces between the operators):
script {LineTerminatorWhitespaceMacro}* language {LineTerminatorWhitespaceMacro}* = {LineTerminatorWhitespaceMacro}* \" (VBS | VBScript)
This will work with the first line but not the second:

<script language = "VBScript">
<script id = "MyID" language = "VBScript">
With standard regex I would use something like:
script .*? language which would handle all characters up to the first occurrence of the word language. But in looking over the docs I don't see a way to implement a non-greedy capture. If this isn't available then what alternative regex construct can I use to achieve the same result? Thanks.

------------------------------- Marianne

Comments (3)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Marianne,

Our regex engine doesn't currently support non-greedy regex captures. That's one of the few remaining features that the .NET engine has that ours doesn't. I can add it to the TODO list for you though.


Actipro Software Support

Posted 12 years ago by Jon Heaton
Avatar

Is this supported in the latest version (2012.1.0302)?

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Jon,

Sorry but there haven't been any changes related to that.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.