c# how to write a dot modifier in RegExp? -


private string pattern = @"^.$"; 

the dot not identified modifier, literal string, how idetify modifier?

you forgot add quantifier .:

if want match 0 or more: @"^.*$"

if want match 1 or more: @"^.+$"

don't forget regular expressions greedy default. if want non-greedy, append ? .*


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -