
libo
Novice
Aug 12, 2002, 1:15 PM
Post #5 of 5
(1500 views)
|
|
Re: [RedRum] how to deal with it?
[In reply to]
|
Can't Post
|
|
Let me explain more abou this problem: $string1 = "<option value=A>AAA</option><option value=B>BBB</option><option value=C>CCC</option>"; $stirng1 is result obtained from a function. "AAA", "BBB", "CCC" are dynamically created by the function. Thus we don't know what are "AAA", "BBB", "CCC" before doing regualar expression. For example: For the first time, we get: <option>...</option><option value=location1>new york</option><option value=location2>chicago</option><option value=location3>houston</option><option>...</option> For the second time, we get: <option>...</option><option value=location1>boston</option><option value=location2>denver</option><option value=location3>houston</option><option>...</option> how to always delete <option value=location2>XXX</option> from the string.
|