oniguruma Questions
1
I'm trying to implement a regular expression matcher based on the backtracking approach sketched in Exploring Ruby’s Regular Expression Algorithm. The compiled regex is translated into an array of ...
Interfere asked 31/7, 2019 at 13:31
1
Solved
I'm trying to use a regex to capture tweets containing the substring 👏 at least twice, so I'm using an unsophisticated ^.+ 👏 .+ 👏 .+$. However this doesn't match strings which instead contain, f...
Hydrocortisone asked 31/3, 2016 at 11:3
2
Solved
Possessive quantifiers are greedy and refuse backtrack. A regex /.{1,3}+b/ should mean: Match any character except line breaks, 1 to 3 times, as many as possible and don't backtrack. Tthen match th...
1
Solved
I've come up with this regex that finds all words that start with $ and contain _ underscores:
\$(\w+)_(\w+)
I'm basically searching for variables, like $var_foo etc.
How do I replace stuff usin...
Onagraceous asked 31/5, 2012 at 20:49
1
Solved
I have this regular expression:
regex = %r{\A(?<foo> a\g<foo>a | b\g<foo>b | c)\Z}x
When I test it against several strings, it appears to be as powerful as a context free gramm...
Exuberance asked 22/1, 2012 at 5:49
3
Solved
I am using textmate to edit a file. I would like to remove all the lines not containing a word. Here is an example.
apple ipad
hp touch pad
samsung galaxy tab
motorola xoom
How can i remove all th...
2
Solved
I've noticed a side effect in Ruby/Oniguruma that is only present in 1 out of 4 seemingly equivalent statements. Why is the variable day defined in 009, but not in 003, 005 or 007?
irb(main):001:0...
Eclogue asked 25/5, 2011 at 12:32
1
© 2022 - 2024 — McMap. All rights reserved.