your regexp for aBalt (aBalt*) is not correct. It is
taking into account aBaltimore also. Instead , you
should have written "aBalt\.* "
--- Zary Necheva <[EMAIL PROTECTED]>
wrote: > Hi,
> I have a file with this data:
>
> ..CITY/STATE. |aBalt., MD
> ..COUNTY. |aBALTIMORE
> ..CITY/STATE. |aBaltimore, Md
> ..COUNTY. |aBALTIMORE
> ..CITY/STATE. |aBaltimore, Maryland
> ..COUNTY. |aBALTIMORE
> ..CITY/STATE. |aBaltimore, MD
> ..COUNTY. |aBALTIMORE
> ..CITY/STATE. |aBALTIMORE, Md
> ..COUNTY. |aBALTIMORE
> ��
>
> The data has to be change this way�
> ..CITY/STATE. |aBaltimore, MD
> ..COUNTY. |aBALTIMORE
> ..CITY/STATE. |aBaltimore, MD
> ..COUNTY. |aBALTIMORE
> ������
> This is my script :
>
> #!/usr/bin/perl -w
> use strict;
>
> while(<>){
> s/\.CITY\/STATE\. \|aBalt*/\.CITY\/STATE\.
> \|aBaltimore, MD/g;
> print;}
>
> This is my output
> ..CITY/STATE. |aBaltimore, MD., MD
> ..COUNTY. |aBALTIMORE
> ..CITY/STATE. |aBaltimore, MDimore, Md
> ..COUNTY. |aBALTIMORE
> ..CITY/STATE. |aBaltimore, MDimore, Maryland
> ..COUNTY. |aBALTIMORE
> ..CITY/STATE. |aBaltimore, MDimore, MD
> ..COUNTY. |aBALTIMORE
> ..CITY/STATE. |aBALTIMORE, Md
> ..COUNTY. |aBALTIMORE
>
> What I am doing wrong?
>
> Thanks.
>
>
>
>
> --
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]