I parce page html body as string.
I am looking for parent /(\[ID\])/iU. I can find it well no problem. But I want to skip all if it is inside <textarea> or value attribute of <input>.
Example
<p>This is your id: [ID]</p>
<p>Please edit it here : <textarea>My id is [ID]<br> Some html because it is WYSIWYG</textarea></p>
<p>Please edit it here : <input type="text" value="My id is [ID]!" /></p>
I want to find first occurrence of [ID] but not second and third.
 
     
     
    