codes image If the question: Will the regular expression "?!:" What does that mean?
Asked
Active
Viewed 58 times
2 Answers
0
This is a "Negative Lookahead Assertion". This code is saying "this regular expression matches only if it begins with /wiki/
and is not followed by a colon".
Consider reading through https://www.regular-expressions.info and in particular the Lookahead and Lookbehind Zero-Length Assertions.

hunteke
- 3,648
- 1
- 7
- 17
-2
? --> zero or one occurrences of the previous expression
! --> negation
: --> simple colon
So... it would mean 'zero or one occurrences of the previous expression, not followed by a colon'

D Ie
- 841
- 7
- 23