regex check variable amount of digits Check for Expiry

Expiry can go from 1 to 299
Expiry can be 1 digit, 2 digits or 3 digits

This will be the Input I check my regExp against.
Rewritet 192.168.3.99, 57714, 192.168.3.3, 22) [*0 2] i0 exp276
Rewritet 192.168.3.99, 57714, 192.168.3.3, 22) [*0 2] i0 exp82
Rewritet 192.168.3.99, 57714, 192.168.3.3, 22) [*0 2] i0 exp2

exp will decrease every second by one
My RegExp
let regExp = \exp[0-2]{0,1}[0-9]{1,2}\

The regeExp matches everything up from 0 up to 299.
Try it here
What do you think about this regExp.
I'm looking forward to any advice about Regular Expressions
Shortcuts You can use 2 special regex syntax rules to make the pattern more concise:

When a token may or may not be matched, instead of {0,1}, it can be done with ? instead - they're exactly equivalent.

When you want to match a digit from 0 to 9, rather than writing out [0-9], you can use \d instead (they're exactly equivalent):


Typo? Regular expressions in JS are delimited by forward slashes, not backslashes.
Prefer const - Unless you plan on reassigning the regExp variable name, better to use const - only use let when you need to warn readers that the variable may be reassigned.
Missing semicolon Unless you're an expert and can avoid the pitfalls of Automatic Semicolon Insertion, I'd highly recommend using semicolons whenever appropriate, else you will occasionally run into hard-to-understand bugs.
Bug? You probably only want to match digits if they fulfill all the rules - I doubt you want to match the 30 part of 300, for example. I'd expect that you want a line that ends with 300 to not match at all, right? Fix it by adding a word boundary at the end:
const regExp = /exp[0-2]?\d{1,2}\b/;

Or, if the digits will always come at the end of the line, use $ and the m flag instead:
const regExp = /exp[0-2]?\d{1,2}$/m;

https://regex101.com/r/udp9BX/7