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:
Quantifier error!

 



ianilkumar
Novice

Aug 3, 2012, 12:24 PM

Post #1 of 2 (6705 views)
Quantifier error! Can't Post

What is wrong with the following regular expression?

$line =~ s/batch.check.interval(+\s)\<sec\>/batch.check.interval 2/g;

It throws an error as below:

Quantifier follows nothing in regex; marked by <-- HERE in m/batch.check.interval(+ <-- HERE \s)<sec>/


This is what iam trying to replace

batch.check.interval <sec>

with

batch.check.interval 2

Regards
Anil


FishMonger
Veteran / Moderator

Aug 3, 2012, 1:38 PM

Post #2 of 2 (6698 views)
Re: [ianilkumar] Quantifier error! [In reply to] Can't Post

The + quantifier needs to come after \s not before it.

 
 


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

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