Just remember \W will not include _ (the underscore) it's part of \w world. To get the "real" alphabet and be nice to locales, try using the posix class [:alpha:] like so:
#!/usr/bin/perl $alpha = 'aeiou_XZY_^#@_123_BCD'; ($one = $alpha) =~ s/\W//g; # _ stays ($two = $alpha) =~ s/[^[:alpha:]]//g; # _ gone print $one, "\n"; print $two, "\n";
-derby
In reply to Re: Non alphabet characters
by derby
in thread [untitled node, ID 154894]
by Samn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |