Can we have a regex to detect if a number is even ?
I was wondering if we can have a regex to do this instead of usual % or bit operations.
%
Thanks for replies :)
If it is a string, just check if endsWith(0) || endsWith(2) || .. returns true. If it is number, it is very simple.
endsWith
(0) || endsWith(2) || ..