On Thu, 14 Sep 2006, Brian Drumm wrote:

> I think this should be simple, but I must have been dancing all around
> the answer for the last couple of hours.
>
> I want to match any single occurrence of the character ">" at the
> beginning of a line, but want to ignore any occurences where there are
> multiple instances of the same character in sequence, like ">>>".

This should cover you

^>{1}[^>]

Breaking it down
=====================

^>{1} #any line that starts with a ">", repeated one time ...
[^>]  #folled by a single occurance of any
      #character which is not a ">"

Edge Case
=====================

The only thing this won't cover is a ">", on the final line of your file,
all by itself.

--
Alan Storm
http://alanstorm.com/

-- 
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to