php - regular expressions missing out certain letters -


is there simple way ignore/miss out letters. problem find word 5 letters long not contain letters b,j,m or n.

can specify letters want such [a][c-i][k-l][o-2]? doesn't appear clean , still need specify word needs 5 letters long. guess need /w , {5} not sure how combine all. thanks.

this selects characters except bjmn:

[^bjmn]{5} 

if want lower case letters except listed:

[c-ik-lo-za]{5} 

if don't want 5-letter-words part of longer words, add word boundary checking:

\b[c-ik-lo-za]{5}\b 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -