in reply to Re^3: Help for generating multiple file from singl e file and parsing it.
in thread Help for generating multiple file from singl e file and parsing it.

Hi Marshall thank you very much for help me out. now it working perfectly.
i have one more issue can you please guide me for writing a reguler expression for substitution.
i have this pattern :- 3023NMANS.20111011.2 as a value of hash where starting no (3023) and last no (.20111011.2) will be change and NMANS wil be constant.i need to write reguler expression for substituting this pattern with nothing.
i really appreciate for your help.
  • Comment on Regeler expression->Re^4: Help for generating multiple file from singl e file and

Replies are listed 'Best First'.
Re: Regeler expression->Re^4: Help for generating multiple file from singl e file and
by Marshall (Canon) on Oct 26, 2011 at 16:17 UTC
    Still not sure what you want. To separate the numbers back out, perhaps:
    #!/usr/bin/perl -w use strict; my $str ='3023NMANS.20111011.2'; my ($front,$end) = $str =~ /^(\d+)NMANS([.\d]+)/; print "$front $end\n"; #3023 .20111011.2
    if you are using 3023NMANS.20111011.2 as a hash key, then you want to delete it to remove it and its associated value from the hash.