Write a program/function that, given three integers n,a,b prints a regular expression which matches all of the base-
n integers from
b (and no integers outside of that range).
Your algorithm should, in theory, work for arbitrarily large integers. In practice, you may assume that the input can be stored in your data type. (don't abuse native data type, that's a standard loophole)
n, a, b where
n is in the range 1-32.
b may be taken as base-
n string/character list/digit list.
A single string, represent the regex.
- Base-n integers use the first
0123456789ABCDEFGHIJKLMNOPQRSTUV, you can choose to use upper-case or lower-case.
bmay be negative, denoted by a
-in front of the integer
- You may assume
a ≤ b.
- Any regex flavor is allowed.
- The behavior of the regex on strings not a base-n integer is undefined.
Answers will be scored by the length of the code in bytes. (so code-golf rules apply)