Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>Try this</strong></p> <pre><code>(?im)^[0-9]*,[0-9]*$ </code></pre> <p>or, <strong><em>more accurately</em></strong></p> <pre><code>(?im)^([0-9]*,[0-9]+|[0-9]+,[0-9]*)$ </code></pre> <p><strong>Explanation</strong></p> <pre><code>&lt;!-- (?im)^([0-9]*,[0-9]+|[0-9]+,[0-9]*)$ Match the remainder of the regex with the options: case insensitive (i); ^ and $ match at line breaks (m) «(?im)» Assert position at the beginning of a line (at beginning of the string or after a line break character) «^» Match the regular expression below and capture its match into backreference number 1 «([0-9]*,[0-9]+|[0-9]+,[0-9]*)» Match either the regular expression below (attempting the next alternative only if this one fails) «[0-9]*,[0-9]+» Match a single character in the range between “0” and “9” «[0-9]*» Between zero and unlimited times, as many times as possible, giving back as needed (greedy) «*» Match the character “,” literally «,» Match a single character in the range between “0” and “9” «[0-9]+» Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+» Or match regular expression number 2 below (the entire group fails if this one fails to match) «[0-9]+,[0-9]*» Match a single character in the range between “0” and “9” «[0-9]+» Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+» Match the character “,” literally «,» Match a single character in the range between “0” and “9” «[0-9]*» Between zero and unlimited times, as many times as possible, giving back as needed (greedy) «*» Assert position at the end of a line (at the end of the string or before a line break character) «$» --&gt; </code></pre>
 

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