This is not meant to be a full run through the syntax and features - the docs give you that - this is just meant to illustrate one of the key differences; how quantifiers are denoted ( and also as a reminder to me next time I'm shouting at Visual Studio for not finding the thing I know damn well is there ).
Normally to find all UUIDs I'd use a pattern like
[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}
but in Visual Studio quantifiers are expressed differently and you need something like
[0-9a-fA-F]^8-[0-9a-fA-F]^4-[0-9a-fA-F]^4-[0-9a-fA-F]^4-[0-9a-fA-F]^12
which is fine once you know about it.
As well as using different symbols for other quantifier constructs (
@
instead of *
, #
instead of +
) there doesn't seem to be support for an optional expression ( normally ?
) or range quantifiers ( {m,n}
).Oh and don't forget
:b
to match whitespace!?!!!Ho hum, there it is.
No comments:
Post a Comment