How can I parse a string which looks like this:
name1=value1 name2=value2 name3=value3
and
name1: value1; name2=value2; name3=value3
and
name1=value1&name2=value2&name3=value3
Values may be quoted, like name1="value1",
but not like name1: "value1",into two variables which would be name, value: string;
I need this so I could parse HTML element attributes from text, which look like this:
<input type="submit" name=s1 value="Submit query" style="bgcolor: #ffffff; color: #000000">
And also for url parameters which look like this:
http://www.delphiarea.com/forum/posting ... wtopic&f=5
It would be nice to have a function like: GetAttribute(wholeText, attributeName: string): string;
Can anyone show me how to do this, cause I have no idea how to do it and I'm desperate???
Thanks in advance...
m_b