DNS ENUM RR interpretation

Hi Guys,

This is really really urgent. Am looking out for some quick answers.

I'm developing a DNS Resolver client that interprets DNS Query repsonses & pass on the needful to DNS applications.

When an ENUM query(modified to an nslookup naptr query) is issued & an NAPTR RR(Resource Record) is obtained, how is the Regexp(Rule) applied to the domain name or URI? I have gone through RFC's but I'm not very clear with how a Regexp(Rule) is to be interpreted or applied!

For example,
Domain Name: 9.8.7.6.5.4.3.2.1.9.8.e164i.arpa

NAPTR RR:
;; order pref flags service regexp replacement
IN NAPTR 0 0 "U" "E2U+sip" "!^.*$!sip:\1234567@errata.com!" (root)

How should the regexp(rule) be applied to the domain name.

Anticipating a reply!
Thanks.

This may sound cheesy, but does this help?

NAPTR - Wikipedia, the free encyclopedia

Also, don't be afraid to look at the BIND source.