Raw Input Desired Output
Section "Device"
  ### Available Driver options are:-
### Values: : integer, : float, : "True"/"False", ### : "String", : " Hz/kHz/MHz" ### [arg]: arg optional Option "NoAccel" # [] #Option "SWcursor" # [] Option "Dac6Bit" # [] #Option "Dac8Bit" # []
Section "Device"
  Option "NoAccel" # []
  Option "Dac6Bit"  # []
Script and Comments
Script1
[ 1] /^*(#.*)?$/d
Comments
  1. The `-r' of GNU sed must be used to make it interpret REs as EREs.
  2. A regular expression may be constructed according to the equivalent finite automata shown in the follows:
  3. The primary RE constructed is ^*($|#.*$),
    this can be reduced to ^*(|#.*)$,
    then further to ^*(#.*)?$.