Which .NET RegEx pattern does NOT match the string "Tales from SpiceWorks!"?
'^\w*\ \w* \w*\W$'
'^(?x)\w{5} \w{4} \w{10}!$'
'^[^bunz]*$'
'^(?:\w{4,10}\s?){3}\W$'
EXPLANATION
'^(?x)\w{5} \w{4} \w{10}!$' does not match because it uses
the RegEx option "x", which ignores unescaped white space; if you
replaced the white space with "\s" or removed the "(?x)" option, it
would work.
0 comments:
Post a Comment