I have two combinations:
To check multiple 1000 which ^[1-9]+[0-9]*000$.
To check the value is greater than 25000, which ^\\d{6,}$|^[3-9]\\d{4}$|^2[5-9]\\d{3}$.
When I tried to combine two regular expressions with a positive lookahead operator, as shown below,
^(?=[1-9]+[0-9]*000)(?=\\d{6,}$|^[3-9]\\d{4}$|^2[5-9]\\d{3})*$
Its accepting values, such as 25000100.35000100, which are not a multiple of 1000.
Is it possible to execute both scripts with a single regex?
source
share