How to get the required string from the given string by using Regex

Hi all kindly help me to get the required string by looking into the below string.

Kindly requesting don’t attach the screenshots of the solution just give the expressions for getting the string having length 12 characters which just before the Registered

need the string "

Kindly help me to get the required string

System.text.regularExpressions.regex.match(inputString, "([\d]{12})Registered").Groups(1).value

You can learn Regex here :blush:

thank you for your support

Reach out on the forums if you need more help :blush: For next time. it is always best to provide a sample, the expected output and any information you have. Like this:

Sample
Account 12345

Output needed
12345

Information on the Pattern
The word ‘Account’ is constant.

.

.
This will get you fast responses with reliable regex patterns

Hopefully this helps :slight_smile:

Cheers

Steve

Hi Kindly help me to get the required string by looking into the below string.

<\r\nManage UPI ID\r\no\r\nAccount No.\r\n000478903123\r\nI\r\nV 000412343123\r\n000456783120\r\nRegistered UPI

from the above string i need the value by using regex “000456783120” , the string Registered is constant but the text before the “000456783120” the string is not constant. kindly help me to get it.

Note: don’t post any Screenshots or data, just send the expression

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