On Fri, 2 Mar 2007, amit hetawal wrote:

> Hello all,
>
> I have a string which comes from a database entry which looks like:
>
> $temp = "XXXXX'YYYY'ZZZZ";
> now i want to remove all the single qoutes from this string ( ' ) so
> as to make it looks like:
>
> "XXXXXYYYYZZZZ"
>
> I am trying to write a simple regex for it but its not working for me.
>
> $temp = ~s/^'$//g;
>
> i know there is something wrong with the ( ' ) 's . But dont know what.
>
>
> Please advice whats going wrong here, and whats the idea behind this.

You don't need the anchors (^,$).  If I understand this correctly, then
the only line it would match is:

'

A single byte line, not including the /n.

HTH,

Kevin

Kevin Viel
PhD Candidate
Department of Epidemiology
Rollins School of Public Health
Emory University
Atlanta, GA 30322
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to