This seems to do the trick:
>perl -wMstrict -le "my $s = '~/tmp/hfj/abc/bhd/5009.xmlreal.xml'; $s =~ s{ \A .* / \d+ }{}xms; print qq{'$s'}; " '.xmlreal.xml'
In reply to Re: regular expression
by AnomalousMonk
in thread regular expression
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |