Modifing config files

Tyler Bird BIRDTY at
Fri Feb 25 09:37:30 MST 2005

Heres a multi-line regex from tom christiansen on FMTEYEWTK

    while ( 
       m{                       # m{foo} is like /foo/, but helps vi's
% key

                 \b             # first find a word boundary

                 (\w+)          # followed by the biggest word we can
                                # which we'll save in the \1 buffer
                   \s+          # now have some white space following
                   \1           # and the word itself
                 )+             # repeat the space+word combo ad

                 \b             # make sure there's a boundary at the
end too

        }xgi                    # /x for space/comment-expanded
                                # /g for global matching
                                # /i for case-insensitive matching

Tyler Bird
UVSC - Continuing Education

>>> nick at 02/25/05 9:05 AM >>>
On Friday 25 February 2005 09:00 am, jeff wrote:
> Oops, I missed something.  I need to be able to specify the section.
> i.e. [import]

No, you didn't miss anything--I did.  The code I posted doesn't do
You'll have to figure out how to do a multi-line regex--I know it's
just not how to do so offhand.

Perl gurus?


Nicholas Leippe
Sales Team Automation, LLC
1335 West 1650 North, Suite C
Springville, UT  84663 +1 801.853.4090 
| This has been a P.L.U.G. mailing. |
|      Don't Fear the Penguin.      |
|  IRC: #utah at   |

More information about the PLUG mailing list