Regular Expression - Two Digit Range (23-79)?

前端 未结 5 1229
天涯浪人
天涯浪人 2021-02-15 18:31

I have been reading the regex questions on this site but my issue seems to be a bit different. I need to match a 2 digit number, such as 23 through 75. I am doing this on an H

5条回答
  •  南方客
    南方客 (楼主)
    2021-02-15 19:01

    This tool is exactly what you need: Regex_For_Range

    From 29 to 79: \b(2[3-9]|[3-7][0-9])\b

    From 29 to 75: \b(29|[3-6][0-9]|7[0-5])\b

    And just for fun, from 192 to 1742: \b(19[2-9]|[2-9][0-9]{2}|1[0-6][0-9]{2}|17[0-3][0-9]|174[0-2])\b :)

提交回复
热议问题