greatshots has asked for the wisdom of the Perl Monks concerning the following question:
those input I get it from a huge input file. I have only those 2 pattern types. what is the modification required to handle those both types ?$string = "KHI0339B__P_H_Vita_Korangi_Ind_A"; my $string_1 = "HGW6120A__S_Popalzai_Cross_A"; $string_1 =~ s/__[a-zA-Z]{1,2}_/__/g; print ":$string_1:\n"; Output :- :HGW6120A__gPopalzai_Cross_A:
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: question : regex
by moritz (Cardinal) on Oct 11, 2007 at 07:19 UTC | |
Re: question : regex
by johngg (Canon) on Oct 11, 2007 at 10:20 UTC | |
Re: question : regex
by jesuashok (Curate) on Oct 11, 2007 at 07:11 UTC | |
Re: question : regex
by Anonymous Monk on Oct 11, 2007 at 08:10 UTC | |
by Anonymous Monk on Oct 11, 2007 at 08:18 UTC |