On Thu, May 5, 2011 at 7:55 AM, Rob Coops wrote:
> /\/|%|\$|\#\#|\s/g
>
Why not just a character class? It's usually a bad idea to use alternation
in these cases. m!^[/%#\s\$]+$! should do the trick. Or if there must be
three #'s in a row, perhaps m!^ (?: [/%\s\$]+ | \#{3} )+ $!x ?
In any case,
Ok let me try to understand the question.
You have a form (on an HTML page or inside an application, command line or
graphics?), this form contains a textarea that should not allow users to
freely enter text but the input should be scanned for "bad" characters, if
those are found the user should r
On 05/05/2011 10:56, Agnello George wrote:
Hi
I got a form with and users and insert in textarea words like :
/word_word2/wordword_word.txt
/word1_word/wordword_word2.txt
/word_word/word2word_word.txt
but they should not be able to type the following in the text area
/
%
$
###
space
Hi
I got a form with and users and insert in textarea words like :
/word_word2/wordword_word.txt
/word1_word/wordword_word2.txt
/word_word/word2word_word.txt
but they should not be able to type the following in the text area
/
%
$
###
space
unless ( $files =~ /^\s+$/ || /[\_\/\@\$\#]/)