Hi All,
I don't actually think regexp is fault. But if anyone could explain this or
give me some example code that will extract the attributes and data between
a fieldset tag pair I would be appreciated.
Henry
Henry Grech-Cini [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi All,
Henry Grech-Cini schrieb:
...
$regexp=/fieldset([^]*)[^(\/fieldset)]*/i;
...
$result=extractFieldsets('testfieldset attribute=hellocontent of
hello/fieldsetemblah/emfieldset
attribute=goodbyegoodbye/fieldset');
...
And it produced;
(0)=
(0)=[fieldset attribute=hellocon]
(1)=[fieldset
Thanks Sven,
You are quite right with your some probs comment.
Do you know what the the switch is that catches only the least result?
I now get
(0)=
(0)=[fieldset attribute=hellolegendhello legend/legendcontent of
hello/fieldsetemblah/emfieldset
attribute=goodbyegoodbye/fieldset]
(1)=
(0)=[
Henry Grech-Cini schrieb:
Thanks Sven,
You are quite right with your some probs comment.
hi,
think i found it. try this:
?php
$rx = '/fieldset.*(.*)\/fieldset/iU';
?
the '/U' stands for 'ungreedy'. also note the change in the attribs-regex.
hth SVEN
--
PHP General Mailing List
4 matches
Mail list logo