I have more words -like apple, orange, banana, a , b , c. i want to select a word with single character only using regex? what to do?
i mean only a, b, c.(answer)
Could anyone help me?
I have more words -like apple, orange, banana, a , b , c. i want to select a word with single character only using regex? what to do?
i mean only a, b, c.(answer)
Could anyone help me?
This should match a single letter between word boundaries
/\b(\w)\b/
The following matches single-character words. \b
matches a word boundary, and \w
a word character.
\b\w\b