CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions: Re: [ladycygnus] 9:5:4 => 09:05:04: Edit Log



ladycygnus
Novice

Aug 22, 2011, 8:00 AM


Views: 5849
Re: [ladycygnus] 9:5:4 => 09:05:04

I want this:

$string =~ s/(\D)(\d\D)/$1a$2/g;

where a is equal to 0...hmm... {{does a quick test}}

This works:

Code
   my $zero = 0; 

$string =~ s/(\D)(\d\D)/$1$zero$2/g;
print "After Change: $string\n";


so...um thanks.


(This post was edited by ladycygnus on Aug 22, 2011, 8:01 AM)


Edit Log:
Post edited by ladycygnus (Novice) on Aug 22, 2011, 8:01 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives