Jump to content

extract only a art of line with regexp


 Share

Recommended Posts

[under the control of Guiness] this simple sre should work

$file = BinaryToString(InetRead("http://javadl-esd.sun.com/update/1.7.0/map-m-1.7.0.xml"))
Msgbox(0,"", StringRegExpReplace($file, '(?s).+?descriptor-(.+?)\.xml.+', "$1"))

as long as the xml keeps the same structure

Hi

Nice, newer thought of use replace for it, I stared me blind on using regex to find the part of the string i needed :)

Cheers

c;") /Rex

Link to comment
Share on other sites

Hey! I don't want to be the Jedi master of regular expressions. -_0 With great knowledge comes great responsibility (which I don't want.)

Master might be that your reputation precedes you ;)

But I know what you mean, I have the same problem with forklift driving - every one wants me to do the special driving.

And I still owe you a beer from last time :)

Cheers

c;") /Rex

Edited by Rex
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...