web stats
Invalid quantifier ? when using Lookbehind regex - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 02-19-2016, 11:26 AM
batejo batejo is offline
What's HL7?
Join Date: Feb 2016
Posts: 3
batejo is on a distinguished road
Default Invalid quantifier ? when using Lookbehind regex


I'm trying to use in a transformer a regular expression to match some data but I'm getting this error.

Here is an example of what I am doing.

The data:

<value name="VALUE" type="Numeric" unit="Ohm">
     <escape type="GREATER_THAN_MAX" />
What I want to match is what is inside the escape.type attribute.

So i execute this javascript in my transformer:

var matches = node.toString().match(/(?<=<escape type=")(.+)(?=" \/>)/);
When deploying my channel I get the error:

SyntaxError: Invalid quantifier ?

How can I use my regular expression without getting the error?

Reply With Quote

javascript, regexp, transformer

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 09:07 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation