Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Feature request (#b)...(...)<not empty>



On Feb 25,  9:24am, Sebastian Gniazdowski wrote:
}
} I thought that ((a|)(b|)(c|)) could be left as it is. So after it scans
} "bold" (a), it normally proceeds to scan "fg" (i.e. b), etc. until it
} finishes the outer parenthesis. No change here.

The problem isn't just what's inside the parens, it's what's outside.
Consider what happens if you have a pattern like this and then make it
part of a larger pattern that repeats zero or more times, or to be a
sub-pattern within another set of parens that also has (#n), etc.
Even if you can make it work by keeping more state than a simple FA,
it becomes easy to write pathologically complex expressions.



Messages sorted by: Reverse Date, Date, Thread, Author