Dear Forum members,
I have one String str= Hello | ID 345.
I want only 345 not other text.
Can anyone help me regarding this.
Regards,
Sahil
Dear Forum members,
I have one String str= Hello | ID 345.
I want only 345 not other text.
Can anyone help me regarding this.
Regards,
Sahil
Hi,
Can you try the following expression?
System.Text.RegularExpressions.Regex.Match(str,"\d+").Value
REgards,
Hey Mate,
Your expression is helping only to extract integer value.
In the string i want to remove Hello | ID , after that there can be anything , i want after that text only.
Thanks,
Sahil
Hi,
How about the following?
System.Text.RegularExpressions.Regex.Match(str,"(?<=Hello \| ID ).*").Value
REgards,
Mate,
Please see this string “PO Closure | PO Number MGAG342”
I want after PO Closure | PO Number.
Your expression is not helping in this specific case, Hello | ID i gave for example only.
I want to remove above specific str.
Can you give us a list of full example strings, and for all the data you want to keep make it bold?
Hey,
Please see this str. This is specific requirement.
Hi mate,
Please help me regarding this specific expression .
If the string’s format is consistent and the data you want is always on the end of the string, you could do the following in two assigns:
StringArrayVar = StringVar.Split({" "},StringSplitOptions.None)
StringVar = StringArrayVar((StringArrayVar.Count)-1)
This will split the string by space (" ") and then take the last item in the array
Thanx mate, your idea is working.
Thanx for your help also buddy.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.