Support Portal

for ProcessRobot and WinAutomation

Start a new topic
Answered

trying to find the correct regex (regular expression)

In a variable I have stored some multililne text (example below), I'm, trying to use the regular expression


/(?<=SerialNumber:  ).*$/gm


to find "2a20192"


This works on a regextester online, but in Process Robot it doesn't find anything (position = -1) when trying to do a "Parse Text".


Anyone knows what the correct regex would be for the Parse Text action ?


"

Test

SerialNumber: 2a20192

Testing again

New line is here

"



Best Answer

Hi Morten!


Please check the empty spaces in the RegEx formula - it seems that there are two spaces after "SerialNumber:" in the formula, but only one in the example text, which causes a mismatch.

1 Comment

ADMIN
Answer

Hi Morten!


Please check the empty spaces in the RegEx formula - it seems that there are two spaces after "SerialNumber:" in the formula, but only one in the example text, which causes a mismatch.


1 person likes this
Login or Signup to post a comment