Re: regex help please

2012-02-09 Thread Andre Garzia
Klaus, I used to work like that, doing little XML files with RegEx and matchText. After working like that for a long time, I came to realize that there was no advantage at all in my case. It was simpler to work with RevXML. The problem with RegEx is all the little cases where it fails. I think

Re: regex help please

2012-02-09 Thread Ken Corey
On 09/02/2012 20:24, Klaus on-rev wrote: in my current project I need to deal with VERY small XML files with maybe up to 20 entries. Wait, didn't we just hear that you can't parse html (or XML) with regexps? *grin* function mk_getXMLdata tText, tTag get matchText(tText,(?s) tTag

Re: regex help please

2012-02-09 Thread Mark Wieder
Klaus, What Andre said. Nonetheless, if you want to continue down the regex path, try something like get matchText(tText,(?s) tTag (.*?)/ tTag ,tValue) replace tTagtValue / tTag with tTagtNewValue / tTag in tText -- Mark Wieder

Re: regex help please

2012-02-09 Thread Klaus on-rev
Hi Andre, Am 09.02.2012 um 21:38 schrieb Andre Garzia: Klaus, I used to work like that, doing little XML files with RegEx and matchText. After working like that for a long time, I came to realize that there was no advantage at all in my case. It was simpler to work with RevXML. The

Re: regex help please

2012-02-09 Thread Klaus on-rev
Hi guys, Am 09.02.2012 um 21:52 schrieb Mark Wieder: Klaus, What Andre said. Sigh... :-) Nonetheless, if you want to continue down the regex path, try something like get matchText(tText,(?s) tTag (.*?)/ tTag ,tValue) replace tTagtValue / tTag with tTagtNewValue /

Re: regex help please

2012-02-09 Thread Andre Garzia
Klaus, Since you have control, then instead of RegEx, you can go like mynode nodecontent /mynode All in different lines, then, you can just use lineOffset to find the start node and the end node and copy or replace the data between those lines. It is easier than RegEx. On Thu, Feb 9, 2012 at

Re: regex help please

2012-02-09 Thread Klaus on-rev
Hi Andre, Am 09.02.2012 um 22:05 schrieb Andre Garzia: Klaus, Since you have control, then instead of RegEx, you can go like mynode nodecontent /mynode All in different lines, then, you can just use lineOffset to find the start node and the end node and copy or replace the data

Re: regex help please

2012-02-09 Thread Ken Corey
On 09/02/2012 21:00, Klaus on-rev wrote: get matchText(tText,(?s) tTag (.*?)/ tTag ,tValue) replace tTagtValue/ tTag with tTagtNewValue/ tTag in tText well, I did not want to pass the text that I want to overwrite in the XML, which I do not now in that moment! But

Re: regex help please

2012-02-09 Thread Ken Ray
Nonetheless, if you want to continue down the regex path, try something like get matchText(tText,(?s) tTag (.*?)/ tTag ,tValue) replace tTagtValue / tTag with tTagtNewValue / tTag in tText well, I did not want to pass the text that I want to overwrite in the XML,

Re: regex help please

2012-02-09 Thread Klaus on-rev
Hi friends, thank you all for your help, i got it to work now! Again thanks a lot! Best Klaus -- Klaus Major http://www.major-k.de kl...@major.on-rev.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to

Re: regex help please

2012-02-09 Thread Bob Sneidar
Your training is almost complete. Destroy Darth Vader and take his place at my side! Mooo haah haah haha hahah ahah! Bob On Feb 9, 2012, at 12:24 PM, Klaus on-rev wrote: So with this text above in tText and tag2 int tTag: function mk_getXMLdata tText, tTag get matchText(tText,(?s)