Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regex : One single character between 2 chars

Tags:

regex

I searched a lot, but never found an answer to my question, and I'm desperate.

I would like to get all dots ( '.' ) between parenthesis wherever they are, and with and undefined number of parenthesis. The problem is that I can just get the first dot, but I don't know how to get all in the same group.

I tried this : \((?:[^\.]*)([\.])(?:[^\.]*)*\)

But it just works if there's just one dot.. Any idea please ?

like image 700
Peekmo Avatar asked Feb 10 '26 19:02

Peekmo


1 Answers

Try this:

(\(|(\.)|\))

example: http://regex101.com/r/jV5yI0

like image 119
l'L'l Avatar answered Feb 13 '26 10:02

l'L'l



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!