Need to get all values before first from header from text(actually from email) using regular expressions

Need to get all values before first from header from text(actually from email).
Ex:

Gdu0shuf0bi0cbu9qruc68qdvjo 0udv9uq

I0f8fh8ejuc0beu9vwf

0ivdwu0bfe80eqbixbq8bc8q

9ibqdcubd9uqbcyvxtu tu is jo ar8wnf

Duovy9dct7z8oka9vn9ubcj welcome af

B7eq du dv7dgwni0 Not dbi0d

Fw

F

F

Rf

G

E

Get

Eg

Good bcbdjbzjcbz,nx<bcjkcjkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk

Zxnjcnxzncmzxncmxzc

C mx cmz czxnc xz cmn cmn c

Cxn cnzx c zxnc zxc mxzc

Nmx cmnz cmnzx cm zxcmz

Xnz cmnz cmnz cmz cm

Nmx cnmz cn zc nmc nmc NC NC vnc

Cc

C

C

C

Zc

Zc

Zc

C

c

From: UiPath ACME <[no-reply@UiPath.com]
get the values from starting till “from” – including all values

Hi @deepaksvg99

Could you please share the proper input and expected output.

Regards

Sample.txt (878 Bytes)

output should be the data from starting till “From” i.e what ever might be the data above “from:” should be extracted and that should be excluding spaces

What output you expected?

is this correct?

Find attached an invoice that needs your attention.
Gdu0shuf0bi0cbu9qruc68qdvjo 0udv9uq
I0f8fh8ejuc0beu9vwf
0ivdwu0bfe80eqbixbq8bc8q
9ibqdcubd9uqbcyvxtu tu is jo ar8wnf
Duovy9dct7z8oka9vn9ubcj welcome af
B7eq du dv7dgwni0 Not dbi0d
Please return this invoice (with the promotional discount added) in PDF format to automation-promotional@uipath.com.
Thank you!
before creating a new post. If you want to report a bug, read the instructions here. To submit a Community Tutorial idea go here.
Note: Please do not disclose any confidential information from you, your customers or any other third parties.
Note: Please do not discuss questions related to UiPath Certified Professional exams as it is a security policy violation
Find attached an invoice that needs your attention.
Sent from Mail for Windows

@deepaksvg99 ,

Use Matches activity Pass Input as you email body text, Pattern as ([\s\S]*?)From:\s

This will output as Ienumarable<Matches>

To Read the output use ienumMatchesVariable(0).Value

Thanks,
Ashok :slight_smile:

Yes that is the expected output

You Can use
Output=input.Split(“From:”).First.ToString.Trim

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