You are welcome, Mark.

To give you a head start, with references to the Manual for 9.6.3:
"(?s)"says to skip over line endings ( p.188)

".+?(HELLO) " says to match any characters up to the first HELLO (non-
greedy matching, p. 177)

"(HELLO)"  The parentheses aren't needed, but are useful for setting
off the search string. You could put parentheses around the "HELLO" in
the second string as well ( "(?s).+?(?=(HELLO))"

"(?=HELLO)"  says to match up to HELLO, but not include it in the
selection (positive lookahead, pp 187, 190)


Steve

On Mar 10, 2:49 pm, Simdude <markmille...@gmail.com> wrote:
> Wow. Thanks Steve. I have to give this a try as soon as I get home.
> And I guess it's time to dig into the BBedit docs some more!
>
> On Mar 10, 2:35 pm, Steve Samuels <sjsamu...@gmail.com> wrote:
>
>
>
> > Searching for  "(?s).+?(HELLO)" will select all text from the cursor
> > up through the first "HELLO" and "(?s).+?(?=HELLO)" will select all
> > text up to first "HELLO">.
>
> > Steve
>
> > On Mar 10, 8:35 am, Simdude <markmille...@gmail.com> wrote:
>
> > > Thanks Chris. I did know about the selection operations but when you
> > > have to do this repeatedly in a file, it's not as efficient. Scripting
> > > is probably a better option but I'll have to improve my Applescript
> > > skills to be able to do this faster.
>
> > > For any Barebones guys, adding something like to to a future BBedit
> > > would be a killer feature. With the help of some books, I've used vi
> > > to rearrange sections of large documents by using commands like this
> > > to find and move sections.  The problem is while you can do this with
> > > a single line in vi, it can take 30 minutes to figure out what to type
> > > in that line!
>
> > > Mark
>
> > > On Mar 9, 5:26 pm, Christopher Stone <listmeis...@thestoneforge.com>
> > > wrote:
>
> > > > On Mar 09, 2011, at 10:28, Simdude wrote:> Is there a way in BBedit to 
> > > > operate on ranges of data? For example, when I use vi, if I want to do 
> > > > a search and replace on all text from my current cursor to the line 
> > > > that contains "HELLO", I would do this:
>
> > > > > :.,/HELLO/ s/this/that/g
>
> > > > > Can BBedit do this sort of range stuff?
>
> > > > ______________________________________________________________________
>
> > > > Hey Mark,
>
> > > > Not directly.  But you can script that kind of search, or you can 
> > > > find/replace in the current selection.  So you could find + 'extend 
> > > > selection' to select your range and then find/replace *within* the 
> > > > range.
>
> > > > --
> > > > Best Regards,
> > > > Chris

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to