Questions tagged [regex]
A regex (a regular expression, regexp) is a textual form for specifying sets of strings in a regular language, often used for matching against. Use this tag for questions about regex as it pertains to developing/implementing a programming language, including for constructs that are not strictly regular such as backreferences. General regex questions are off-topic.
5 questions
0
votes
1
answer
133
views
ASCII-only regex in POSIX shell langauge ... suite [closed]
In a parallel effort of me implementing the C langauge, I'm also implementing the Shell and Utility section (volume actually) of the POSIX standard, to ensure that I have everything I need to compile ...
1
vote
1
answer
167
views
Lexing ambiguity with nested grouping repetition
All tokens in parsing source code must be unambiguous. Regular expressions are almost always used for lexing, but there is one problem in my mind.
Given the regex: ...
27
votes
5
answers
3k
views
Why don't popular regex engines support complement and intersection?
While regex size blows up when defining a function that take two regexes, and return one regex representing their complement/intersection (see Succinctness of the Complement and Intersection of ...
2
votes
1
answer
117
views
When you write regex engines how do you know if question marks `?` mean zero or one of if they refer to non-capturing groups?
When you write regulair expression (regex) engines, how do you tell ....
if ? means zero or one
...or if...
...
21
votes
6
answers
3k
views
Can regex be compiled into efficient machine code?
Most languages that have regex have a regex parsing library that interprets the regex at runtime and matches them to strings. I am a fan of eliminating as much runtime overhead as possible, and as ...