How to extract numeric or alpha numeric values

Hi Team,

I need to extract the numerical values or alpha numerical values in the text using regular expression.

For example:
FISERV, INC. (53500B) CATERPILLAR FINANCIAL SERVICES CORPORATION (8334663) CATERPILLAR FINANCIAL SERVICES CORPORATION (833663) CATERPILLAR FINANCIAL SERVICES CORPORATION (83346).

Above example I need to extract account numbers.
If account number contains only numerical values or alpha numerical values or if account number contains sometimes 7 digits or 6 digits.

If account number contains any kind of values like above.
I need to extract only account number in only one condition using regular expression.

Please suggest.

Thanks,
Baby.

Hi @Baby123 ,

Could you let us know some more details of the Account Number pattern ? Is it always enclosed in Brackets ?

Check the below Expression :

(?<=\()[0-9A-Z]+(?=\))

Visuals :
image

Hi @Baby123

Use the following Regex Expression: (([0-9]+[A-Z]+)|([0-9]+))

I have Uploaded the code for better understanding.
Main.xaml (8.8 KB)

Hope this helps!!

Regards,