I know that this question seems to be banal, but I have small problem. I’m trying to match input similar to this:
%!: Word Word=888 Word=AAA
… using this regex:
[A-Za-z]*
I need just to select first word whitch contains only characters.
My C# code:
string res = Regex.Match("[A-Za-z]*", this.Content, RegexOptions.Singleline).Value;
Please help me. It’s not working for me.
You’re basically there.
Your regex should be
@"\b[A-Za-z]+\b".And then, if you’re wondering why you aren’t getting any matches. It’s because you mixed up the input and pattern parameters 🙂
You want:
NOT:
🙂