Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Instead of trying to split on multiple characters and ignore some of them, try to match whatever you want to match. Since you didn't specify the implementation language I am posting this for Perl but you could apply it to any flavor which supports lookbehind and lookaheads.</p> <pre><code>while ($subject =~ m/(\w+(?=:)|(?&lt;=:)\d+|(?&lt;=,")[^"]*?(?="))/g) { # matched text = $&amp; } </code></pre> <p><strong>Explanation:</strong></p> <pre><code># (\w+(?=:)|(?&lt;=:)\d+|(?&lt;=,")[^"]*?(?=")) # # Match the regular expression below and capture its match into backreference number 1 «(\w+(?=:)|(?&lt;=:)\d+|(?&lt;=,")[^"]*?(?="))» # Match either the regular expression below (attempting the next alternative only if this one fails) «\w+(?=:)» # Match a single character that is a “word character” (letters, digits, and underscores) «\w+» # Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+» # Assert that the regex below can be matched, starting at this position (positive lookahead) «(?=:)» # Match the character “:” literally «:» # Or match regular expression number 2 below (attempting the next alternative only if this one fails) «(?&lt;=:)\d+» # Assert that the regex below can be matched, with the match ending at this position (positive lookbehind) «(?&lt;=:)» # Match the character “:” literally «:» # Match a single digit 0..9 «\d+» # Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+» # Or match regular expression number 3 below (the entire group fails if this one fails to match) «(?&lt;=,")[^"]*?(?=")» # Assert that the regex below can be matched, with the match ending at this position (positive lookbehind) «(?&lt;=,")» # Match the characters “,"” literally «,"» # Match any character that is NOT a “"” «[^"]*?» # Between zero and unlimited times, as few times as possible, expanding as needed (lazy) «*?» # Assert that the regex below can be matched, starting at this position (positive lookahead) «(?=")» # Match the character “"” literally «"» </code></pre> <p><a href="http://ideone.com/sBZGa" rel="nofollow">See it working</a>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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