Hello,
I am trying to use regex to split this string…
" 178
PG Rawat and Associates
Test Wire Transfer
$1.02 Low
Thu Dec 14 2017
Fri Dec 15 2017
Edit "
I did some stuff https://regex101.com/ and came up with this…
/([0-9]+)(.*)/s
and that works. Here is the output…
That is how I would like this to come out in the end.
When I do this with a Uipath process though seen here…
My final result looks like it is just returning the whole string without a split…
FireflySeason2:
/([0-9]+)(.*)/s
Buddy we have an activity called matches
in which pass this string as input to input property and regular expression here
and try buddy
you would get them correctly buddy
Cheers @FireflySeason2
1 Like
Palaniyappan:
/([0-9]+)(.*)/s
Well that’s convenient…thanks
did that get resolved buddy @FireflySeason2
Not yet, I’m trying to figure out how to build the regex in the actiivity to make it work
1 Like
There is a discrepancy between online editors and the Regex builder
The reason for the discrepancy is that I wrote my regex in Perl but Uipath uses the .Net implementation so I have to figure out how to write it that way.
1 Like
buddy what value you were trying to extract from that string buddy
@FireflySeason2
1 Like
178
PG Rawat and Associates
Test Wire Transfer
$1.02 Low
Thu Dec 14 2017
Fri Dec 15 2017
Edit
The above is my string and I want to split that in two where I have 178 and “all the rest” that 178 could be any number at all
dmccammond
(Derek McCammond)
May 24, 2019, 5:58pm
12
I would also like to point out that regex101.com does not have VB.net ’s language and regular expressions are loosely similar between different languages.
If you want something that is more likely to work, I would suggest .NET Regex Tester - Regex Storm .
3 Likes
buddy @FireflySeason2
you can use this buddy
/^(.*)$/m
which would give the first one line buddy
Ya, the testers and documents seems to be somewhat limited for .net regex stuff. Perl is everywhere.
Palaniyappan:
/^(.*)$/m
I have done some work the last few hours and it looks like in order to pull the first line I can use this…
(^\s\d+)
And to get rest of it I use this…
^\ \d+
1 Like