Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The regex below :</p> <pre><code>result = subject.match(/(?:(\(.*?[^'"]\)|.*?[^\\])(?:\.|$))/g); </code></pre> <p>Can be used to acquire the desired results. Group 1 has the results since you want to omit the <code>.</code></p> <p>Use this : </p> <pre><code>var myregexp = /(?:(\(.*?[^'"]\)|.*?[^\\])(?:\.|$))/g; var match = myregexp.exec(subject); while (match != null) { for (var i = 0; i &lt; match.length; i++) { // matched text: match[i] } match = myregexp.exec(subject); } </code></pre> <p><strong>Explanation :</strong> </p> <pre><code>// (?:(\(.*?[^'"]\)|.*?[^\\])(?:\.|$)) // // Match the regular expression below «(?:(\(.*?[^'"]\)|.*?[^\\])(?:\.|$))» // Match the regular expression below and capture its match into backreference number 1 «(\(.*?[^'"]\)|.*?[^\\])» // Match either the regular expression below (attempting the next alternative only if this one fails) «\(.*?[^'"]\)» // Match the character “(” literally «\(» // Match any single character that is not a line break character «.*?» // Between zero and unlimited times, as few times as possible, expanding as needed (lazy) «*?» // Match a single character NOT present in the list “'"” «[^'"]» // Match the character “)” literally «\)» // Or match regular expression number 2 below (the entire group fails if this one fails to match) «.*?[^\\]» // Match any single character that is not a line break character «.*?» // Between zero and unlimited times, as few times as possible, expanding as needed (lazy) «*?» // Match any character that is NOT a “A \ character” «[^\\]» // Match the regular expression below «(?:\.|$)» // Match either the regular expression below (attempting the next alternative only if this one fails) «\.» // Match the character “.” literally «\.» // Or match regular expression number 2 below (the entire group fails if this one fails to match) «$» // Assert position at the end of the string (or before the line break at the end of the string, if any) «$» </code></pre>
    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. 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