Question

Regex Tools

  • 12 April 2022
  • 5 replies
  • 70 views

Hi, i try to exract "^[1-9]{1}[0-9]{9}[02468]{1}$" regex code from my text, but can not find it. i want to subtract 11 composite number. What is wrong on this code? If you help me appreciate for it.

my text document is:

it is test document. 

tckn:44802015620

tckn = 44701045467


5 replies

Userlevel 4
Badge +7

Hi @rojda dilan küpeli​ 

 

If you are trying to extract the eleven digit Token Number, then could you give this pattern a try?

 

\d{11}

 

Kind Regards,

Ashwin A.K

it is special composite number, it is not any 11 number. Do yu recommend any suggestions?

Userlevel 4
Badge +7

Hi @rojda dilan küpeli​ ,

 

You can first extract the number using \d+ and then use conditional statements to validate whether the digit is a special composite number or not.

 

If there are multiple tokens and only one of them are composite, then you can use the Extract All Matches Action and use the conditional statements to filter out the number you want.

 

Kind Regards,

Ashwin A.K

There are a lot of digits number, i want to subtract all of them. with your solution i just subtract 1 digit number.

Userlevel 4
Badge +7

Hi @rojda dilan küpeli​ ,

 

As mentioned above, please use the Extract All Matches Action.

 

Kind Regards,

Ashwin A.K

Reply