正規表現の定義内に正規表現を含めることが可能かどうかを知る必要がありました。
これが私がやろうとしていることです: 整数、自然数、正の整数、負の整数の正規表現を定義しました。ここで、これらの既存の正規表現を使用して、分数の正規表現を定義したいと思います。
Consider
token_int is the regex for integers
token_natural is the regex for natural numbers
token_neg_int is the regex for negative integers
I would like the fraction regex to be defined as:
token_frac = token_int'/'(token_natural | token_neg_int)