and if I want to include certain german umlutted vowels like ö and ä i would add them like this? $string =~ tr/-_a-zA-Z0-9öä//cd; ???? then what does this do? (from parsing SDTIN)
$name =~ tr/+/ /; ### I know this replaces +'s for spaces $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; ### no clue at all $name =~ tr/\0//d; ### replaces zero values to empty???? I know you want me to use modules, but I am trying to learn the syntax, please help with a real answer. I want to be able to filter out undesired charecters so I think I should add $name =~ tr/-_a-zA-Z0-9öä//cd; to the code so it look like this. @pairs = split ( /&/, $Input ); foreach $pair(@pairs) { ( $name, $value ) = split ( /=/, $pair ); $name =~ tr/+/ /; #changes plus sign to space $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $name =~ tr/\0//d; $name =~ tr/-_a-zA-Z0-9öä//cd; $value =~ tr/+/ /;#changes plus sign to space $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/\0//d; $value =~ tr/-_a-zA-Z0-9öä//cd; $Input{$name} = $value; } in a previous question I asked at what point an input with a lynx command like sys or exec is acted on by the program. Never got an answer. can I filter out these commands using tr/ or s/ or that taken care of with -T in hte shebang line? thanks Lou ----- Original Message ----- From: "Charles K. Clarkson" <[EMAIL PROTECTED]> To: <beginners-cgi@perl.org> Sent: Saturday, June 24, 2006 4:15 PM Subject: RE: Regex Help. > Sara wrote: > > : Need help to remove EVERY thing (non-alphabets, symbols, > : ASCII codes etc) from a string except for a-zAZ, 0-9, > : dash and underscore. > : > : $string =~ s/?????? > > > Read perlop: Quote and Quote-like Operators > > > $string =~ tr/-_a-zA-Z0-9//cd; > > > HTH, > > Charles K. Clarkson > -- > Mobile Homes Specialist > Free Market Advocate > Web Programmer > > 254 968-8328 > > Don't tread on my bandwidth. Trim your posts. > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.9.2/372 - Release Date: 6/21/06 > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>