Why capture anything? You just want to place the insertion point at the end of any line that doesn't end in </p> or isn't a blank line. Then you just insert the <br /> at that point.
Dennis On 6/8/09 9:44 AM, "Ted Burger" <[email protected]> wrote: > > Ronald, > > Shouldn't the Replace be > \1<br />)\r > or am I missing something? > > Ted > > On Jun 8, 2009, at 10:32 AM, Ronald J Kimball wrote: > >> >> On Mon, Jun 08, 2009 at 07:00:00AM -0700, RobS wrote: >> >>> I use the following little thing to add BR tags to the end of lines >>> I've selected... >>> Find: \r >>> Replace: <br />\r >>> ...with "Selected text only" checked. >> >>> How can the Find/Replace pattern be improved so it skips over blank >>> lines and any line ending in </p>? >> >> Try this: >> >> Find >> (?<!^|</p>)\r >> >> Replace >> <br />\r >> >> (?<!...) is a negative look-behind. It matches if the next part of >> the >> regex is not preceded by whatever is in the look-behind. >> >> >> Ronald >> >>> > > *********************** Ted Burger **************************** > [email protected] ********* www.tobsupport.com > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a specific feature request or would like to report a suspected (or confirmed) problem with the software, please email to "[email protected]" rather than posting to the group. -~----------~----~----~----~------~----~------~--~---
