Matches Activity to extract text and comparison between result

Hi all,
I read a text from a putty.log. I want to compare two number sequence to make sure Server Backup is succesed.
as below pictures. I want to get sequence no. 127928 from pic1 and pic2, but i don’t know how to define the expressioin pattern.
Please give me some suggestion… or
I found some expression below… still dont get how RegEx Builder Wizard work…

  • “(?<=$)(\d+,? )+(.\d+) ” is the RegEx pattern, we use to extract the amount
  • (?<=$) is a positive lookbehind, where we specify, we want to look behind a ‘$’
  • (\d+,? ) then we look for one or more digits (\d+) and one or none thousand delimiter
    • one or more of the preceding patterns (otherwise it would stop after ‘2,’
  • (.\d+ ) a decimal delimiter (.) and one or more digits (\d+)

image
image

Hi,

Hope the following helps you.

First, the following extracts SEQUENCE# which is ARCH CLOSING from 1st text.

"(?<=ARCH\s+CLOSING\s+\d+\s+)\d+"

Then workflow will be the following, for example. We can check if it exists using IsMatch activity with the result of the 1st Matches activity.

Regards,

1 Like

Thanks for your reply,
Could you please introduce what /s /d meaning?
or where can i get the further information, thanks again

Hi,

Could you please introduce what /s /d meaning?
or where can i get the further information, thanks again

\s means any whitespace character (including tab, linebreak etc)
\d means decimal digit.

The following document helps you.

Regards,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.