I am facing a problem when using Match activity in Uipath. I am trying to match this string:
G 3940UNL 10k 29.5 2615 N 3957 59.5 6528 0G N G N G 920SNL 5k 29 1277 N 925 43 2174 0G 1795Clear 5k 46 2373 N 1805 74 4146 0G N G 1360Dyed 10k 33 3051 N 1366 43.5 4415 0
Regex i used is (G N)(G\s[0-9]{2,6})*, i want to match any “G N” or “G ‘number’”. There’s total of 7, and it needs to be 7.
It looks like it is working in Regex Builder, but when i test it, it returned with a lot of empty matches. I think it is because the spaces are being matched as well. I guess what i am asking is how to remove the empty matches that was included in the match result, or how i do modify my Regex to be more precise. (removing space in the string is not an option, unless i can match exactly 7 instances of “GN” and “G’Number’” in total, which i dont know how to do)
Sorry, i wasn’t completely clear, this Regex only returned 4 matches, for example, G N G N G 920 was considered one match, but i need it to be 3 separate matches, G N , G N , and G 920
OK perfect. But unfortunately now i do Not understand you. Can you please some help and can Highlight in your Sample Text manually the expected result. Thanks