Re: regexp
- From: "Paul Lalli" <mritty@xxxxxxxxx>
- Date: 30 Jan 2007 03:40:26 -0800
On Jan 30, 6:30 am, avlee <x...@xxxxx> wrote:
How to cut all the characters from varibale except digits ?
$string =~ tr/0-9//cd;
or, using a regexp, as your subject line mentioned:
$string =~ s/\D+//g;
Please read:
perldoc perlop (search for "tr/")
perldoc perlretut
perldoc perlre
Paul Lalli
.
- References:
- regexp
- From: avlee
- regexp
- Prev by Date: regexp
- Next by Date: system() commands
- Previous by thread: regexp
- Next by thread: system() commands
- Index(es):
Relevant Pages
|