in reply to Re: regex: Need help substituting
in thread regex: Need help substituting

Thanks for your reply! That would work using the parser, given all values need to be changed are the same? If they differ I would need several instances of the parser? If I'm not mistaken the parser approach builds around the idea that I already know the value, which is not my case. I need to read the old value, do some calculations and reinsert the new value. I realize my example was not optimal, sorry for that. In reality all values are not neccecarily the same. I still would like to know how this would be achieved using regexp. Thanks again, Pontus

Replies are listed 'Best First'.
Re^3: regex: Need help substituting
by mbethke (Hermit) on Apr 07, 2012 at 21:50 UTC

    You can do whatever calculations you like in the XML::Twig tag handler. Trying to do this with regexen is like hammering in a screw---you can do it but it's neither the easiest nor the most adequate way, so just don't.

Re^3: regex: Need help substituting
by toolic (Bishop) on Apr 07, 2012 at 16:48 UTC
    I realize my example was not optimal
    OK, so show us a better example of what you are trying to do, what you have tried, and how it doesn't work for you.