[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: usage question
From: |
Ian McNish |
Subject: |
Re: usage question |
Date: |
Wed, 11 Oct 2000 12:56:36 -0700 (PDT) |
> I'm guessing your problem is with the regex. It looks like you're
> trying to use globs instead of regexes. In order to match that string,
> you'll want something like this:
>
> LocateLineMatching ".*hey there buddy:.*"
> CommentNLines "2"
>
> In regex-speak, "." means "match any character" and "*" means "match
> zero or more of the previous character". Basically, regex ".*" is
> eqivilant to glob "*".
>
> If there's a chance that those lines might not be in the file at all,
> you'll want to wrap a "BeginGroupIfLineMatching '.*hey there buddy:.*'"
> "EndGroup" around those lines above. "LocateLineMatching" will abort
> editing of the file if no match is found.
>
> -James
>
thx, works great now.