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

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Regular Expressions: Re: [arokiamary] Urgent help needed : Edit Log


Sep 7, 2011, 5:43 PM

Views: 5715
Re: [arokiamary] Urgent help needed

s/// desnt ignore it replaces whats matches in the first // and replaces it wil the next // so s/a/B/ will replace a with B, so are you trying to capture everything before the RG 2 and Relegation? if so you'll need to rethink your regex to either capture from the beginning of the string or you change your code to whats below and it will remove whats matched by the regex.

#captures the Reg. and RG 2 and removes them
$vldbString =~ s/Regulation\s+\d+\s*//;
$vldbString =~ s/RG\s*\d*//;

#capture everything before regulations
$vldbString =~ /^(.*)Regulations|REGULATIONS/;

(This post was edited by wickedxter on Sep 7, 2011, 5:43 PM)

Edit Log:
Post edited by wickedxter (User) on Sep 7, 2011, 5:43 PM

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

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