Try:
^[1-9][0-9]?$|^100$
EDIT: IF you want to match 00001, 00000099 try
^0*(?:[1-9][0-9]?|100)$
More Related Contents:
- RegEx for Multi-Words Without Numbers and Any Special Characters
- Regex to match string containing two names in any order
- Regular expression to find URLs within a string
- Replace single backslash in R
- Regex how to match an optional character
- Remove all special characters from a string in R?
- Create new column in dataframe based on partial string matching other column
- Regular expression to match last number in a string
- R/regex with stringi/ICU: why is a ‘+’ considered a non-[:punct:] character?
- Regex for comments in strings, strings in comments, etc
- Regular expression – starting and ending with a character string
- Select rows from data.frame ending with a specific character string in R
- Regex not operator
- Regular Expression Match to test for a valid year
- Find numbers after specific text in a string with RegEx
- What is a regex to match ONLY an empty string?
- R split on delimiter (split) keep the delimiter (split)
- Find the location of a character in string
- Is there an R function to escape a string for regex characters
- Regular Expression Vs. String Parsing
- How can I match a string with a regex in Bash?
- Regex empty string or email
- Regular expression to find two strings anywhere in input
- Remove square brackets from a string vector
- When is it best to use Regular Expressions over basic string splitting / substring’ing?
- Overlapping matches in R
- Replace string only once with php preg_replace
- Remove all characters before a period in a string
- How to measure similarity between strings?
- Regular expression to match string starting with a specific word