Reputation: 1977
I am looking to extract the data after the last closing brace. This is the test string:
RAID-622(00)02(88)845364758
My regex is:
\).*
What I have managed to get is: )02(88)845364758
But what I want is 845364758
Any tips?
Upvotes: 0
Views: 94
Reputation: 115272
You can use following regex [^)]*$
to get string after the last )
and at the end
Upvotes: 1
Reputation: 786091
You can search for greedy regex:
.*\)
and replace it by empty string.
.*\)
will match longest string before )
due to greedy .*
, hence matching up to last )
in your input text.
Upvotes: 0