I'm having trouble coming up with a regex to accept two possible values.
I would like to accept a % or a number and unit.
For example. Any percentage between 0% and 100% are acceptable. OR Any integer followed by a suffix. (10 AB, 78JB, 244 AB). Only possible suffixes are (AB, JB, RB, LB, IB)
Value must be one or the other (2% OR 10 AB);
I can do these individually with regex but don't know how to combine into one.
\d+\s?(AB|JB|RB|LB|IB)?
\d+\s?\%
|to match either!10 ABin10 ABC? Try/\d+\s?(?:(?:AB|JB|RB|LB|IB)\b|%)/g\d+\s?(?:%|AB|JB|RB|LB|IB)combine and conquer..