Gurus,
I am new to RegEx. How can i validate following.
All characters in my strings are [A-Za-z0-9] and underscore
The string MUST begin with Upper Or lowercase character.
Maximum length is 51
can have underscores in between but no spaces any where
cannot end with underscore
Valid
=======
John_Smith
John
JOHN
J129
J129_89
J129_89_aBC
Invalid
=========
J__33 == has two underscores continuously
J__33_ == ends with underscore
TIA