Extract one line from "jit.str.regexp"
Hi there guys,
This is my first post, I have done some searching around and just cannot seem to get this patch working as I want. I'm sure it's painfully simple, but i just can't figure out how to do it. Essentially, i'm loading an XML file into a jit.textfile, then running a query for everything within tags. It's working perfectly well, but it prints out all 20 results, ideally, i just want the first result. If anyone can help me, i'd be so grateful!
Edit->Copy Compressed
Thanks, amended!
one way:
Brilliant, That's pretty much exactly what I need.
Thanks for your help so quickly!
You should be able to do this all in regexp. Something like this might do it too:
-Ben
regexp gives me headaches!! ;)
Thanks for your help guys, both methods seem to work. I have to say for now I agree with MIB, It's giving me a headache, but I may have to look into it further at a later point in my project,
These forums are awesomely useful!
Thanks again!
Sam
Hi Sam,
Could post the fixed patch? I am fairly new to max and not advanced enough to figure out the code posted here. I am a student trying to use weather xml data to match it up to sound. A basic example for pulling in xml data will be helpful.
Thanks,
Paba
Hi all,
Paba7: See Bens patch above (Copy the code, then in max create new from clipboard)
Ben: Is there any way to configure the regexp object to not output the final '' as it appears on the end of every string. Been racking my brains about this for ages!
Many Thanks
Sam
Did you find a way to do it Sammi02?
I am trying this also and I can't figure out, Is it something to do with the gate ? If I print from gate I can see its all there, but I don't know how to get all of it, in the message box it just displays the last line..