Exclude certain numbers from range of numbers using Regular expression
问题 Could some one help me with the regular expression, where we can exclude certain numbers in between from a range of numbers. Presently, ^([1-9][0][0-9])$ is the regular expression that is configured. Now if i want to exclude a few numbers/one number( 501 , 504 ) from it, then how would the regular expression look/be. 回答1: Described in more detail in this answer, you can use the following regex with the “Negative Lookahead” command ?! : ^((?!501|504)[0-9]*)$ You can see the regex being