I need to have a REGEX that would filter out and only accept a certain groups of string, or in my case, codes.
This is what I have, and it works but doesn’t seem like the smartest way to doing this.
/^[046R,047R,048R,049R,050R,051R\ ]+$/
Now, the list of codes that I can accept are anywhere from ‘046R’ to ‘089R’ (the 046 to 089 are sequential). So I can keep explicitly writing all the codes accepted on my expression (as I started above) but there is a better way for sure.
Any ideas?
Thanks.
Ranges to the rescue:
Live example: http://www.rubular.com/r/Bfnm4Tj7hT