Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Ok, that would then strip those characters that were not in the check I did. How could I get $_field1Check to not have the field that is acceptable, rather have the left the ones that are NOT acceptable so I can show the user?my $_field1 = $in{other_state}; if($_field1 =~ /[^A-Za-Z0-9\.\, ]+/) { my $_field1Check = $_field1; $_field1Check =~ s/[^A-Za-Z0-9\.\, ]+//g; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: getting stripped characters from string
by AnomalousMonk (Archbishop) on Nov 10, 2010 at 22:21 UTC | |
|
Re: getting stripped characters from string
by aquarium (Curate) on Nov 10, 2010 at 23:37 UTC | |
|
Re: getting stripped characters from string
by Anonymous Monk on Nov 10, 2010 at 22:19 UTC | |
by Anonymous Monk on Nov 10, 2010 at 22:48 UTC | |
|
Re: getting stripped characters from string
by 7stud (Deacon) on Nov 11, 2010 at 00:29 UTC |