ManojGL
(Manoj GL)
March 28, 2018, 9:52am
#1
Hi All,
Can you please help me out in solving the below hurdle.
I want to use regex expression in my workflow for the particular type.
Steps to Reproduce:
Go to https://regex101.com/
Place the below text in “Test String” space provided.
Actual Result : I need only 1,2,3 and 4 from the text mentioned below.
text to be inserted in Test String:
16-March-2018
17-march-2018
1,000
1,000
1,000
3,000
6,000 1
2
3
4
RPA
18-march-2018
19-march-2018
20-march-2018
MAHESH1
(MAHESHKUMAR JV)
March 28, 2018, 10:08am
#2
@ManojGL
First Split your string and and join it to a single string
and join string with two spaces
strb=String.Join(" ",stra.Split({Environment.NewLine},stringSplitOptions.None))
System.Text.RegularExpression.Regex.Matches(strb,"\s\d\s")
Regards,
Mahesh
Dominic
(Dominic Arul Collins)
March 28, 2018, 10:17am
#3
@ManojGL , Check this Regex Pattern
\b\d(?!.)\b
\b - Word Boundary
\d - Digit
?! - Negative Lookahead
(?!.) - Consider values that dont followed by any characters other than newLine
Regards,
Dom
1 Like
ManojGL
(Manoj GL)
March 28, 2018, 11:27am
#4
Thanks @Dominic , it is working fine now.
I checked for some other flows too.
Regards
MG