I have been seeing this in some PHP script:
[a-zA-Z0-9_]++
What does the double plus mean?
That's a Possessive Quantifier.
It basically means that if the regex engine fails matching later, it will not go back and try to undo the matches it made here. In most cases, it allows the engine to fail much faster, and can give you some control where you need it - which is very rare for most uses.
2.1m questions
2.1m answers
60 comments
57.0k users