Given RegExp = (0+1+|2+3+)∗
We can assume this exp as (A+|B+)* . We can form the string with A(01) or B(23) or both(01,23). So below are the 10 possible 4 char strings.
With 01 --> 0111, 0011, 0001, 0101
With 23 --> 2333, 2233, 2223, 2323
Using both 01 and 23 --> 0123, 2301
Hope it helps.. Thanks :)