I am using the following RegEx to match <field>
elements in XML view of Adobe LiveCycle Designer XFA form.
Check the RegEx (?i)<(field)[\s\S]*?<\/\1>
and sample XML here: https://regex101.com/r/80gkRp/1
The above RegEx is working fine, and I could play with it pretty well. However, I am finding difficulty limiting the matches for certain element types.
Suppose, for example, I want to match certain field elements, which has attribute presence="hidden"
and must have the inner button
element, and <bind>
element with attribute match
must equal none
(ie bind match='none'
must be present), as follows:
<field bla bla bla name="First_Name" presence="hidden" bla bla bla>
... bla bla
<ui>
<button bla bla bla/>
</ui>
...
<bind match="none"/>
...
</field>``
Please give me solution as close as possible, and no need to satisfy the above complex criteria, at lease to be able to match the field which is a button.
Tarek