Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This would fetch the whole entry;</p> <pre><code>/&lt;ASObject.*?&gt;postinjr&lt;/wagescategorytypecode&gt;.*?&lt;/ASObject&gt;/gs </code></pre> <p>.. but it's strongly advised to use a XML-parser to properly process the data.</p> <p>Here's a link to the RegExr: <a href="http://regexr.com?34cfg" rel="nofollow">http://regexr.com?34cfg</a></p> <p>This would fetch only it's inners (without <code>&lt;ASObject&gt; ... &lt;/ASObject&gt;</code>);</p> <pre><code>/&lt;ASObject.*?&gt;(.*?&gt;postinjr&lt;/wagescategorytypecode&gt;.*?)&lt;/ASObject&gt;/gs </code></pre> <p>.. and fetch group 1 (<code>$1</code>); <a href="http://regexr.com?34cfj" rel="nofollow">http://regexr.com?34cfj</a></p> <p>You should do another RegEx on the fetched content to separate the sub-items you've got. It will be very messy to make a situational RegEx to exactly get the data based on that inner value and also separate the items by group.</p> <p>This is a very raw start to fetch the inner items, but it will only go down one level and will not handle escaped slashes and (<code>&lt;</code>/<code>&gt;</code>, <code>/</code>);</p> <pre><code>/&lt;.*?&gt;(.*?)&lt;/.*?&gt;/gs </code></pre> <p><a href="http://regexr.com?34cfm" rel="nofollow">http://regexr.com?34cfm</a></p> <p>If you really want to do everything in one RegEx, you should look into assertions;</p> <ul> <li><code>?=</code> Lookahead assertion</li> <li><code>?!</code> Negative lookahead</li> <li><code>?&lt;=</code> Lookbehind assertion</li> <li><code>?!=</code> Negative lookbehind (or <code>?&lt;!</code>)</li> <li><code>?&gt;</code> Once-only Subexpression</li> <li><code>?()</code> Conditon <code>[if then]</code></li> <li><code>?()|</code>Condition <code>[if then else]</code></li> <li><code>?#</code> Comment</li> </ul> <p>I'll leave, how all that works, to you to research ;)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload