regex - Matching all characters in a string except one in any position -


how match (preferably in perl) strings match query string except 1 character?

query: tlaqllldk

want match: xlaqllldk, txaqllldk, tlxqllldk, etc.

where 'x' capital letter '[a-z]'.

use alternation operator.

^(?:[a-z]laqllldk|t[a-z]aqllldk|tl[a-z]qllldk|.....)$ 

likewise fill all..


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -