Reputation: 568
There can be instances where I can have 10 semicolons or only 1. However what is after the semicolon I do not need since it is interfering with my capture.
12AB(1,2,3,4,5);34AB(1,2,3,4,5); - Junk data I do not want
If I can stop the capture after the last ;
that would solve my problem. I have been searching but only found information for a backslash which I can't get to work nor do I understand it.
I'm using Nintex to process this information which is built on .NET but does not allow the formatting in the same manner as .NET.
Upvotes: 1
Views: 1097
Reputation: 107347
You can replace the result of following regex that will match a semicolon which has been followed by combinations of characters with length 0 and more except semicolon that followed by the end of string anchor.
';[^;]*$'
with an empty string, in order to remove it.
But you might have another ways without using regex, like finding the index of first semicolon on reversed version of your string then replace it with an empty string, or maybe using another efficient functions that the language has provided.
Upvotes: 1