Saturday, 15 January 2011

regex - What does this regular expression mean /^[a-z]{1}[a-z0-9_]{3,13}$/ -



regex - What does this regular expression mean /^[a-z]{1}[a-z0-9_]{3,13}$/ -

can elaborate next regular expression:

/^[a-z]{1}[a-z0-9_]{3,13}$/

and give sample strings satisfy regular expression?

explanation: /^[a-z]{1}[a-z0-9_]{3,13}$/

^ - asserts start of string

[a-z]{1} matches 1 character a-z.

[a-z0-9_]{3,13} matches character a-z or 0-9 length range must between 3 13.

$ end

example

regex

No comments:

Post a Comment