Hi!
I would like to replace
a1 {
someting
}
in the text
a1 {
someting
}
a2{
someting
}
a3 {
someting
}
The expression "a1.*\}\r\n" does find all until the last }
How can I get the shortest match?
Thanks
Finding the shortest match
- DigitalVolcano
- Site Admin
- Posts: 1863
- Joined: Thu Jun 09, 2011 10:04 am
Re: Finding the shortest match
You could try this:-
a1.*?\}\r\n
The question mark makes the .* less greedy.
a1.*?\}\r\n
The question mark makes the .* less greedy.
Re: Finding the shortest match
That's it!
Thank you!
Thank you!