Guharo Guharo - 1 year ago 243
C# Question

REGEX - Letters and symbols (C#)

Please I need help:

My regex:


I want the regex match with:
Start with letters, only one point, letters and underscores,finish with letters.
(No finish with underscore)




Thanks for the help :)

Answer Source

I think this may help:


Start with a letter, then a dot, any combination of letters and underscore, and finish with a letter.

Instead checking if there is no underscore at the end, you know that always will be a letter. Its simplier to read.

You can see the regex test (with fixed issues you find) here: - Test

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download