Regex to find words with specific character

后端 未结 3 1777
别那么骄傲
别那么骄傲 2021-01-29 02:27

How to find all words which contain a specific letter in it?

For example, if my string is

This is a Station called South Yarra

then I

3条回答
  •  感情败类
    2021-01-29 02:47

    Depending on how you want to handle punctuation such as hyphenation, consider using just \w*a\w*.

    FYI: \w matches a word character.

提交回复
热议问题