# RegEx challenge (or just seems that way)

**URL:** <https://community.glideapps.com/t/regex-challenge-or-just-seems-that-way/36138>\
**Category:** Ask for Help\
**Created:** [December 20, 2021, 1:48pm UTC](https://community.glideapps.com/t/regex-challenge-or-just-seems-that-way/36138 "2021-12-20T13:48:11Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [December 20, 2021, 8:02pm UTC](https://community.glideapps.com/t/regex-challenge-or-just-seems-that-way/36138/9 "2021-12-20T20:02:03Z")

</div>

Hi again @Darren_Murphy and @Test_Test

I get this using the JavaScript plugin, In my case, I only want phones with the format:  
**XXXX** - **YYYYYYY** (4 numbers \<5 + “-” + 7 numbers)

```auto
const r = /([0-4]{4})-([0-9]{7}$)/;
return r.test(p1) 

```

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/5/a52cb8289156d0156a7c4cc0971e74685bfee028.png)

I hope it helps!

Saludos.

---

_[View the full topic](https://community.glideapps.com/t/regex-challenge-or-just-seems-that-way/36138)._
