How to extract the string values

I want to extract the values from below string.
Output have to store into variable

Can anyone please guide me on this?

e.g. Variable Name Value
Subscriber WSD JR, JRSBY
Member ID SGH993246857
DOB Mar 24, 1964
Gender Male
Plan Date Jan 15, 2005 - Dec 31, 9999

String

Edit
Print

WSD JR, JRSBY
Subscriber

Member ID
SGH993246857

DOB
Mar 24, 1964

Gender
Male

Plan / Coverage Date
Jan 15, 2005 - Dec 31, 9999

Hi @vaibhav2.chavan

To give you the best answer possible, can you give me the following information?

  1. Do you need the text need to be formatted like you write (The \newlines mainly)?
  2. Is the example text part of a bigger string made by the same format with different Variable Name Value ?

Thank you

@Gabriele_Camilli -

String Variable in which I’m capturing the data from UI its coming in the below format -

E.g

Edit
Print

WSD JR, JRSBY
Subscriber

Member ID
SGH993246857

DOB
Mar 24, 1964

Gender
Male

Plan / Coverage Date
Jan 15, 2005 - Dec 31, 9999

After that from the above string I want to separate the values and need to be stored in separate variable like below.

e.g. Variable Name Value
Subscriber WSD JR, JRSBY
Member ID SGH993246857
DOB Mar 24, 1964
Gender Male
Plan Date Jan 15, 2005 - Dec 31, 9999

You can use the following Regex to get the variable parts of the text:

  • Subscriber β€œ.*(?=\nSubscriber)”
  • Member ID β€œ(?<=Member ID\n).*”
  • DOB β€œ(?<=DOB\n).*”
  • Gender β€œ(?<=Gender\n).*”
  • Plan Date β€œ(?<=Coverage Date\n).*”

And then just Concat the string to have the wanted result

1 Like

hi check this xaml file BlankProcess2.zip (18.2 KB)

Hello

I would take a look at this post also if you want to learn Regex for next time :slight_smile:

1 Like