Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>CHANGELOG</strong></p> <blockquote> <p><strong>20/01/2017</strong></p> <ul> <li><p>UA strings update: 141 matching, 0 partially matching, and 797 invalid lines </p></li> <li><p>"Mobile Safari 1.1.3 (iPhone U; CPU like Mac OS X; en)" is considered invalid even if it mentions iPhone. Actually a semi-colon is missing after the <code>iPhone</code> term which is suspicious.</p></li> <li><p>Safari 8+ doesn't appear yet on UserAgentString.com</p></li> </ul> </blockquote> <p><strong>PREREQUISITES</strong></p> <ul> <li>The following regex is generic.</li> <li>It will match Safari user agent strings (SUAS) running on a mobile device (see below supported devices list).</li> <li>The regex is based on known SUAS by <a href="http://useragentstring.com/pages/useragentstring.php?all=TRUE&amp;name=Safari&amp;vers=" rel="nofollow noreferrer">UserAgentString.com</a> as of <strong>20/01/2017</strong>.</li> </ul> <p><strong>REGEX</strong></p> <pre><code>^(?:(?:(?:Mozilla/\d\.\d\s*\()+|Mobile\s*Safari\s*\d+(?:\.\d+)+\s*)(?:iPhone(?:\s+Simulator)?|iPad|iPod);\s*(?:U;\s*)?(?:[a-z]+(?:-[a-z]+)?;\s*)?CPU\s*(?:iPhone\s*)?(?:OS\s*\d+_\d+(?:_\d+)?\s*)?(?:like|comme)\s*Mac\s*O?S?\s*X(?:;\s*[a-z]+(?:-[a-z]+)?)?\)\s*)?(?:AppleWebKit/\d+(?:\.\d+(?:\.\d+)?|\s*\+)?\s*)?(?:\(KHTML,\s*(?:like|comme)\s*Gecko\s*\)\s*)?(?:(?:Version|CriOS)/\d+(?:\.\d+)+\s*)?(?:Mobile/\w+\s*)?(?:Safari/\d+(?:\.\d+)*.*)?$ </code></pre> <p><strong>SUPPORTED DEVICES LIST</strong></p> <ul> <li>iPhone</li> <li>iPhone Simulator</li> <li>iPad</li> <li>iPod</li> </ul> <p><strong>EXPLANATION / CUSTOMIZATION</strong></p> <p><em>Lines preceded by a <strong>C</strong> can be customized.</em></p> <pre><code> 1. ^(?:(?:(?:Mozilla/\d\.\d\s*\()+|Mobile\s*Safari\s*\d+(?:\.\d+)+\s*) C 2. (?:iPhone(?:\s+Simulator)?|iPad|iPod);\s* 3. (?:U;\s*)? 4. (?:[a-z]+(?:-[a-z]+)?;\s*)? 5. CPU\s* 6. (?:iPhone\s*)? C 7. (?:OS\s*\d+_\d+(?:_\d+)?\s*)? C 8. (?:like|comme)\s*Mac\s*O?S?\s*X 9. (?:;\s*[a-z]+(?:-[a-z]+)?)? 10. \)\s*)? 11. (?:AppleWebKit/\d+(?:\.\d+(?:\.\d+)?|\s*\+)?\s*)? C 12. (?:\(KHTML,\s*(?:like|comme)\s*Gecko\s*\)\s*)? C 13. (?:(?:Version|CriOS)/\d+(?:\.\d+)+\s*)? 14. (?:Mobile/\w+\s*)? 15. (?:Safari/\d+(?:\.\d+)*.*)?$ </code></pre> <p><strong>line 1.</strong> UA strings may differ so this line is introduced for accepting UA strings as much as possible.<br> <strong>line 2.</strong> You can specify here the piped-separated list of accepted devices.<br> (...)<br> <strong>line 7.</strong> The version is indicated here. Change this line if you want a special version. Don't forget to update <strong>line 13</strong> too. For instance, matching <em>iOS 5.x.y</em> use <code>(?:OS\s*5_\d+_\d+\s*)?</code>.<br> <strong>line 8.</strong> Some user agent strings are translated. The word <code>like</code> may be translated into a foreign language. The regexp now supports <code>English</code> and <code>French</code>. Adapt this line if you encounter other languages. Don't forget to update <strong>line 12</strong> too.<br> (...)<br> <strong>line 12.</strong> See <strong>line 8.</strong><br> <strong>line 13.</strong> See <strong>line 7.</strong> For instance, matching <em>iOS 5.x.y</em> use <code>(?:Version/5\.\d+\.\d+)?\s*)?</code>.<br></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