Question 1
Following sample solution in Perl includes its own manual page in the POD (plain old documentation) format:
Question 2
Start symbol is <A>, final states are <D>, <G>, and <H>.
The regular grammar:
<A> ---> [0-9] <B> <A> ---> . <C> <B> ---> [0-9] <B> <B> ---> . <D> <C> ---> [0-9] <D> <D> ---> [0-9] <D> <D> ---> [Ee] <E> <D> ---> [dDfF] <H> <D> ---> <empty> <E> ---> [+-] <F> <E> ---> [0-9] <G> <F> ---> [0-9] <G> <G> ---> [dDfF] <H> <G> ---> <empty> <H> ---> <empty>
Its associated DFA diagram:
Also available as q2.fig or q2.eps.