Skip to main content
Solved

How resolve this issue?/

  • January 5, 2022
  • 1 reply
  • 107 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?

Best answer by Ashwin A.K

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

This topic has been closed for replies.

1 reply

Ashwin A.K
Forum|alt.badge.img+10
  • Navigator | Tier 3
  • Answer
  • January 5, 2022

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