The regex needs to return the first warning element directly parented by a para0 element (no grandchildren allowed).
As an XPath, that would be
/descendant::para0/child::warning[1]
In shorthand:
//para0/warning[1]
In reply to Re: regex - need first child of parent
by ikegami
in thread regex - need first child of parent
by kdolan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |