Well, I am guessing that you use some sort of whitespace between words,
like a space.  The below regex does not include the space character!

Change your character set to include more characters..

From:
[a-zA-Z0-9\.,;:]

To:
[a-zA-Z0-9\.,;: ]

Or, to save a few chars..
[\w\.,;: ]

Would be a start.



                                                                                       
                                                    
                      zentara                                                          
                                                    
                      <zentara@highstream.         To:      [EMAIL PROTECTED]         
                                                    
                      net>                         cc:                                 
                                                    
                      Sent by:                     Subject: Taint checking a bunch of 
word input                                           
                      Agent-Linux-Wine@oni                                             
                                                    
                      on.perl.org                                                      
                                                    
                                                                                       
                                                    
                                                                                       
                                                    
                      04/09/02 09:34 PM                                                
                                                    
                                                                                       
                                                    
                                                                                       
                                                    




Hi,
Taint checking has got me stumped.
I'm using CGI to bring in a variable amount of data from
a Textarea in a form.

What's the best way to untaint a bunch of words?
They may or may not span multiple lines.

Everything I've tried will give me $1 being just the
first word.
For example:
if ($comment =~ /([a-zA-Z0-9\.,;:]*)/m){$comment = $1}

How do you get $1 to capture everything that would be
in normal comments, with resorting to (.*)  :-)




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to