Test extensions by last digits

Hi,

Is it possible to test build up extensions according to the last to digits?

Something like:

exten => _XXXX12
exten => _XXXX11

but without having a fixed number of digits before. In theory:

exten => _X.12, but this does not work.

Thanks in advance

Bruno Henriques