Help For String Manipulation

Hi, Can any one please explain this exprpession?

row(1).ToString.Split(Environment.NewLine.ToCharArray,StringSplitOptions.RemoveEmptyEntries)(0).Split(":".ToCharArray,StringSplitOptions.RemoveEmptyEntries)(1).Trim

This is a screenshot of a portion that is extracted from a pdf and this data is in a single cell

doubt

The output is 4526079023

@ADITYA_MUKHERJEE
row(1).ToString.Split(Environment.NewLine.ToCharArray,StringSplitOptions.RemoveEmptyEntries)
it is taking 2nd row sencond column to a string splits the string in a string array by all newLine chars

(0).Split(":".ToCharArray,StringSplitOptions.RemoveEmptyEntries)
it is taking from above retrurned string array the first item and splits it based on : into a string array

(1).Trim
from from second received split array it takes the second item, removes the leading and trailing spaces

et voila: The output is 4526079023

2 Likes

Hi @ADITYA_MUKHERJEE,

I was wondering you are trying to understand the expression or looking for solution if so then use this regular expression that gives you output
This is for your reference
image

if this solves your query then mark this as solution.
Happy Automation!’
Regards,
Aditya

1 Like

Thanks a lot brother…I am stuck with another doubt, can you help?

How can I separate address, telephone number, emai id, website into different cells?

doubt.xlsx (8.5 KB)

@ADITYA_MUKHERJEE
Please open a new Topic on this. Clear separated scenarios will help members doing a research to find solutions faster. Thanks

2 Likes

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