in reply to Dynamic Regex?
Why not use 'tr' to get rid of junk in the input ?
This will kill everything except o,k,_,c,h,a,r,s in
$my_input:
$my_input =~ tr/ok_chars//dc;
If you want to check and not 'clean' $my_input, you can
run the above on a copy of $my_input and then compare it
to the 'clean' version.
I suppose this can be used with U and C tr options
for unicode support.
FuzzyCow