snipt

Ctrl+h for KB shortcuts

JavaScript

israel phone number regex

1
2
3
4
5
//cellular israeli regex
/^05\d([-]{0,1})\d{7}$/

//all numbers israel
/^0\d([\d]{0,1})([-]{0,1})\d{7}$/
https://snipt.net/embed/3de7626f89448ca0a807f37b123a5bf1/
/raw/3de7626f89448ca0a807f37b123a5bf1/
3de7626f89448ca0a807f37b123a5bf1
js
JavaScript
7
2019-07-23T16:12:31
True
False
False
/api/public/snipt/27506/
israel-phone-number-regex
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1">//cellular israeli regex</span> </span><span id="L-2"><a name="L-2"></a><span class="sr">/^05\d([-]{0,1})\d{7}$/</span> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="c1">//all numbers israel</span> </span><span id="L-5"><a name="L-5"></a><span class="sr">/^0\d([\d]{0,1})([-]{0,1})\d{7}$/</span> </span></pre></div> </td></tr></table>
"regular expression", javascript, js, regex