Quantcast
Channel: Adobe Community: Message List - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 3715

Re: Finding text with RegEx

$
0
0

Hi Klaus and Rick,

 

As you are looking for particular strings, which always have double sets of square brackets around them, it is dead easy to remove those characters from the resulting match strings. That is what I do in my workaround, where I have to remove redundant single bracket pairs around parts of an expression.

 

sResult = sMatches[i].substring( 2, sMatches[i].length - 2 );

 

A more elegant way of keeping the delimiters out of the match would involve using both the look behind and a look ahead features of regular expressions, but the look behind seems to be unsupported in javascript.

 

Ciao

 

Jang


Viewing all articles
Browse latest Browse all 3715

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>