Split the string into 1 Part

Hi,
I have a string which contains a string, I need to split it into simple string
The String is :- “ABCD.EFGH_212234S21.PDF”
I need to split the above string and get the output as
212234S21
How should we do that?
Thanks in advance!!

Hi @Kunal_Jain

You can use the regular expressions to extract the required data from Input,

[A-Za-z0-9]+(?=.PDF)

image

Check the below workflow,

- Assign -> Input = "ABCD.EFGH_212234S21.PDF"
- Assign -> Output = System.Text.RegularExpressions.Regex.Match(Input.ToString, "[A-Za-z0-9]+(?=.PDF)").Value.ToString.Trim

Hope it helps!!

strTextValue.split(“_”)(1).Tostring.Split(“.”)(0).Tostring

Hi @Kunal_Jain

inputstr.Split("_"c)(1).Split("."c)(0)

Hope it helps!!

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