Extract string and numbers from a given line

Hi Team ,

I have below examples -

  1. Fw: PCI SSC Invoice Enclosed - ABC039382909
  2. Fw: ABC0399456 - FW: GoDaddy/KPMG - Vertex & Taxability Assistance
  3. Fw: Invoice - ABC0394758

I want to extract ABC039382909 , ABC0399456 , ABC0394758 from the above examples. Basically ABC and the integers following that until a space comes.

Please help me with the string manipulation for this.


hi , did you try regex.
(ABC\d+) → this could be the regex pattern to extract your information.

1 Like

this will extract the text for you

assign the following to a string variable, which will store the text you want to this variable
System.text.regularExpressions.regex.match(txt, "([A-Z]{3}[\d]+)").Groups(1).Value

1 Like

thanks a lot

1 Like

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