I am new to using regex but I feel my pattern may be too complex.
I am looking for a pattern of a minimum number of brackets with a maximum number of dots interspersed. I can't see a way for regex to count the numbers of dots in the overall pattern instead of sequentially.
For example:
...((((((((.(((..((..((((.(((((((.(..(((((.(((.(((...))).))).)))))..)..))))))).))))..))..))).))))))))(((.((.(((((...((........))))))))))))............
If I want to identify a run of at least 25 (
s with a maximum of 15 .
s interspersed from the first (
to the last:
...((((((((.(((..((..((((.(((((((.(..(((((.(((.(((...))).))).)))))..)..))))))).))))..))..))).))))))))(((.((.(((((...((........))))))))))))............
My regex is currently searching for a a sequence with a maximum of 15 consecutive .
s instead.
Is this possible? If not should I be using an alternative (i.e. pyparsing)
This is what I have so far:
(\.{0,15}\(){25,}