Hi team,
My string value str=“201 - Double A”
some time my string value str=“201 - Double”
I need output as if string value coming first like i need to output as output =“Double A”
second string value coming I need output as output as =“Double”
can you any one help me on these regex value
rlgandu
(Rajyalakshmi Gandu)
July 3, 2024, 7:55am
3
@Mada_Sai_Krishna
(?<=\-\s)[A-Z a-z]+
System.Text.RegularExpressions.Regex.Match(Input,"(?<=\-\s)[A-Z a-z]+").Value
mkankatala
(Mahesh Kankatala)
July 3, 2024, 8:08am
4
Hi @Mada_Sai_Krishna
You can simply use the below regular expression to extract the Text in data.
- Assign -> Input_Str = "201 - Double A"
- Assign -> Output_Str = System.Text.RegularExpressions.Regex.Match(Input_Str.toString, "(?<=\d+\s+\-?\s*)[A-Za-z\s]+").Value.toString.Trim
Check the below image for better understanding,
Check the below workflow file,
Hope it helps!!
@Mada_Sai_Krishna ,
Tyr this.
Regex:
System.Text.RegularExpressions.Regex.Replace(strInput, "[^a-zA-Z ]", "")
Sample workflow:
Extract Text.xaml (7.2 KB)
Thanks,
Ashok