Question

How resolve this issue?/

  • 5 January 2022
  • 1 reply
  • 50 views

Hi,

I am extracting 7 digit number from given strings

Screenshot (84)using regex (\b\d{7}\b) , during first and second iteration it will take the 7 digit number then move to the third iteration its shown error like this(An unexpected error occurred. 

begin -1, end 6, length 57), Maybe the third string do not have a 7 digit number.

Anyone know how to resolve this issue?


1 reply

Userlevel 4
Badge +7

Hi @Prasanth A​ ,

 

Try using the Regex Tools: Extract a Regex Match Action

 

image 

The alternative would be to use the String: Replace Action like so to retrieve the match:

 

(?<=\d{7}).*|.*(?=\d{7})

 

image 

You can then check if $rExcelRecord{Message}$ Not Equal sMatch -> Match present

 

Kind Regards,

Ashwin A.K

Reply