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: Intermediate: Re: [Laurent_R] Need a script for small change: Edit Log



kuber123
New User

Sep 14, 2013, 5:49 AM


Views: 4545
Re: [Laurent_R] Need a script for small change

Laurent,

Your script is applicable for the below number only. But my requirement is.

$line =~ s/<ref id="ref0152">/<ref id="R1">/g;

ref0152 is variable. it can start at any number. where ever the <title>References</title> starts, below the ref id sequence should change as R1.

One more thing is References will appear four or five times. SO every where the sequence will start at 1 like mentioned above.

Please find my input:

$xmlcont =~ s#(<ref) (id=\")ref00(\d)(\">)#\1\2F\#\4\3#gi;

In Reply To



(This post was edited by kuber123 on Sep 14, 2013, 6:08 AM)


Edit Log:
Post edited by kuber123 (New User) on Sep 14, 2013, 5:56 AM
Post edited by kuber123 (New User) on Sep 14, 2013, 6:08 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