web stats
Regex /s flag - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-27-2015, 07:21 AM
dilq99 dilq99 is offline
What's HL7?
 
Join Date: Apr 2015
Posts: 2
dilq99 is on a distinguished road
Default Regex /s flag

Hi,

I'm using Mirth Connect 3.2.2

I am trying to use the channel pre-processor script to strip out logging text contained between '>' and '<' characters in an HL7 batch file. this may include any character including CRLFs and whitespaces, but must end at the first '<' after the '>'

I can create a regex which does this nicely on regex101.com but it uses the /s flag which doesn't appear to be supported by the parser in Mirth 'invalid flag after regular expression. How can I replicate the functionality of the /s flag please?

return message.replace(/\>.*?\</igs,'');
Reply With Quote
  #2  
Old 08-27-2015, 07:23 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,119
narupley is on a distinguished road
Default

Just use [\s\S] instead.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 08-27-2015, 07:24 AM
dilq99 dilq99 is offline
What's HL7?
 
Join Date: Apr 2015
Posts: 2
dilq99 is on a distinguished road
Default

Ahh thanks, I'll give that a go
Reply With Quote
Reply

Tags
regex

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 05:02 PM.


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