SoFunction
Updated on 2025-03-03

A regular expression matching the form "#100"

I want to match the shape

#00
#01
#02
..........................

#116
#117

There are more than 100 characters in total, and those that exceed this range do not match.

How do I write it? Hope the experts give me some advice.
Copy the codeThe code is as follows:

/^#[0-9][0-9][0-7]?/

[0-7]? means that the last number is at most between [0-7], 0 or more matches, but if the data #997 is also a match