Reg Exp help needed
| From: | Sparky Kopetzky | Date: | Tue, 24 Jun 2003 18:42:21 +0000 |
| Subject: | Reg Exp help needed | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-152647@lists.php.net to get a copy of this message | ||
I'm translating (hacking) code from Perl to PHP and have two reg exp expressions I can't
figure out what they do.
1st: $goodbadnum =~ tr/0-9//cd; I think this one removes any chars that are not numbers.
2nd: $goodbadnum =~ tr/0-9/x/; I think this one replaces and numbers with an 'x'.
Right, wrong??
Robin E. Kopetzky
Black Mesa Computers/Internet Services
www.blackmesa-isp.net