One more question...
Using the regular expression above, I can't show the messages from the message tag if there is more than one word inside the tags separated with space.
For example <message>Message goes here</message> won't be shown with "<(message)>(.*?)</message>".
Hmmm, well, I was about to say "I don't know it just won't work".
But your example works. Now, I removed some lines from my xml file. The <?xml version... one and the <data></data> tags.
Inside those tags are the <name></name> ones. Now it's working! It was working before as well but not inside...
I want to print a regexp variable inside a loop from an xml file.
I'm reading the xml file through http.
This an example of my xml file:
<name>foo</name>
<name>foo1</name>
I'm using this tcl code:
foreach line $html {
regexp "<(name)>(.*?)</name>" $line dummy tag name
}
The problem is, I can...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.