# Detecting number ranges

**URL:** <https://forum.xbench.net/t/detecting-number-ranges/973>\
**Category:** General Discussion\
**Created:** [December 25, 2022, 11:22am UTC](https://forum.xbench.net/t/detecting-number-ranges/973 "2022-12-25T11:22:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeFunk](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.xbench.net/lefunk/32/289_2.png) [@LeFunk](https://forum.xbench.net/u/LeFunk)\
**Post date:** [December 25, 2022, 11:22am UTC](https://forum.xbench.net/t/detecting-number-ranges/973/1 "2022-12-25T11:22:04Z")

</div>

Hello!

I’d like to check if a segment contains a number range with hyphen, like 1-230 or 50-3456  
I wrote regex pattern

```auto
<[:digit:]+-[:digit:]+>

```

But it also picks up groups that are not number ranges like 555-678-345.  
Isn’t the \> interpreted as the word boundary?

---

<div class="post-metadata">

**Author:** ![pcondal](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.xbench.net/pcondal/32/305_2.png) [@pcondal](https://forum.xbench.net/u/pcondal)\
**Post date:** [December 26, 2022, 11:43am UTC](https://forum.xbench.net/t/detecting-number-ranges/973/2 "2022-12-26T11:43:41Z")

</div>

Yes, the `>` is a word boundary, but the dash `-` is also considered a word delimiter so it matches the search.

Maybe you can try with PowerSearch with this search expression:

`"<[:digit:]+-[:digit:]+>" -"<[:digit:]+-[:digit:]+-[:digit:]+>"`

---

<div class="post-metadata">

**Author:** ![LeFunk](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.xbench.net/lefunk/32/289_2.png) [@LeFunk](https://forum.xbench.net/u/LeFunk)\
**Post date:** [December 31, 2022, 1:04am UTC](https://forum.xbench.net/t/detecting-number-ranges/973/3 "2022-12-31T01:04:03Z")

</div>

Thank you, it works great!
