您的位置:首页 > 其它

[Regex Expression] Tagline --- {0, } {1,10}

2016-03-05 21:56 267 查看
Using a character set repeated 1 or more times, make a pattern to search for strings that do not contain the characters 'a', 'e', 'i', 'o', 'u', and 'y'.

/[^aeiouy]+/gi


Next, surround our pattern with a word boundary on each side.

/\b[^aeiouy]+\b/gi




But wait, our pattern is considering strings containing white space to be misspelled words. Add the white space to the characters we wish to not match.

/\b[^aeiouy\s]+\b/gi




-----------------------------------------



-------------------------------

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: