The regular expression ^[A-Za-z](\W|\w)* matches when the user gives the first letter as white space, and the first letter should not be a digit and remaining letters may be alpha numerical. When the user gives a white space as the first character it should automatically be trimmed. How?
The regular expression ^[A-Za-z](\W|\w)* matches when the user gives the first letter as white
Share
Should do it. Just get group 1.
I’m not sure the language you are using, I’m going to assume C#, so here is a C# sample:
This will print
to the console window.