Re: Grep Help

2010-01-17 Thread Garth Fletcher
Warren Michelsen wrote: I need to search for a td/td tag set and everything in between, which may include line breaks but which must include an anchor. I use: td(?s)(.+?)/td where: (?s) = search across end of lines .+? = non-greedy match to anything -- Garth Fletcher -- You

grep help, delete everything other than what I'm matching

2009-10-28 Thread BB Design
I'm using BB Edit grep to select a/a links like this: (\a.*\\/a) So I can paste the match using: \1 However, I basically want to delete everything else in the document except these links, so that all I am left with is the links. Possible to modify my code to accomplish this? Thanks!

Re: grep help, delete everything other than what I'm matching

2009-10-28 Thread Doug McNutt
At 09:30 -0700 10/28/09, BB Design wrote: I'm using BB Edit grep to select a/a links like this: (\a.*\\/a) So I can paste the match using: \1 However, I basically want to delete everything else in the document except these links, so that all I am left with is the links. Possible to modify my

Re: grep help, delete everything other than what I'm matching

2009-10-28 Thread Miraz Jordan
On Thu, Oct 29, 2009 at 05:30, BB Design bradbans...@gmail.com wrote: I'm using BB Edit grep to select a/a links like this: (\a.*\\/a) So I can paste the match using: \1 However, I basically want to delete everything else in the document except these links, so that all I am left with is

a little grep help please

2009-06-08 Thread RobS
Hi, As usual, grep beyond the most basic defeats me. I must suffer from dysgrepia. 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. Even I can do that. ;-) I use this for poems where I define

Re: a little grep help please

2009-06-08 Thread Dennis Cox
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 t...@tobsupport.com wrote: Ronald, Shouldn't the Replace be \1br /)\r

Re: grep help

2009-05-14 Thread Ze'ev
Here's some sample lines: NOTE:r 307072427\na 0014017578\n\nr 307072427\na 0014017578\nr 307072427\na 0014017\n NOTE:17 -2nd place (clinton-henry) 0D\nF\: carroll st fr\n\n17 -2nd place (clinton-henry) NOTE:Mailing Address\:\nBroadVoice\, Inc.\nPO Box 10\nBi\n\nMailing

grep help

2009-05-13 Thread Ze'ev
Any grep wizards out there? I'm trying to clean up a bunch of vcards. After various synchs, I have repeated information in my notes field, e.g.: NOTE:blabla\nJim's guy\n\numesh\nJim's guy\n\numesh\nunique\nJim's guy \n\numesh\nJim's guy\n\numesh\n\nJim's guy\n\numesh\nJim's guy\n\numesh

Re: grep help

2009-05-13 Thread Patrick Woolsey
Ze'ev zgi...@gmail.com sez: I'm trying to clean up a bunch of vcards. After various synchs, I have repeated information in my notes field, e.g.: NOTE:blabla\nJim's guy\n\numesh\nJim's guy\n\numesh\nunique\nJim's guy \n\numesh\nJim's guy\n\numesh\n\nJim's guy\n\numesh\nJim's guy\n\numesh

Re: grep help

2009-05-13 Thread Ronald J Kimball
On Wed, May 13, 2009 at 09:12:39AM -0700, Ze'ev wrote: Any grep wizards out there? I'm trying to clean up a bunch of vcards. After various synchs, I have repeated information in my notes field, e.g.: NOTE:blabla\nJim's guy\n\numesh\nJim's guy\n\numesh\nunique\nJim's guy

Re: Grep help?

2009-03-26 Thread Robert A. Rosenberg
At 21:22 + on 03/25/2009, Patrick James wrote about Re: Grep help?: Hi Assuming each list element is on a new line as per your example I  think that: ol.+\r(li.+\r){10,}/ol should select what is required. I am not up on my GREP but I have an impression that this might catch cases where

Re: Grep help?

2009-03-26 Thread le...@gmail
On Mar 25, 2009, at 15:22, Patrick James pjl...@googlemail.com wrote: Assuming each list element is on a new line as per your example I think that: ol.+\r(li.+\r){10,}/ol should select what is required. There's no need for negative lookahead. There is with multiple lists in the same

Re: Grep help?

2009-03-26 Thread G. T. Stresen-Reuter
On Mar 26, 2009, at 7:53 AM, le...@gmail wrote: On Mar 25, 2009, at 15:22, Patrick James pjl...@googlemail.com wrote: Assuming each list element is on a new line as per your example I think that: ol.+\r(li.+\r){10,}/ol should select what is required. There's no need for negative

Re: Grep help?

2009-03-26 Thread Seth Dillingham
On 3/25/2009, le...@gmail said: I know I can do this with a negative look-ahead something or other, but despite years and years of regexs, I do not grok that particular mechanism. I want to search for lists that contain at least 10 list items. Try this:

Re: Grep help?

2009-03-26 Thread Jonathan Lundell
On Mar 26, 2009, at 11:39 AM, le...@gmail wrote: On 26-Mar-2009, at 10:42, Ronald J Kimball wrote: (?s:([uo]l)[^]*\s*(?li[^]*.*?(?:/li\s*|(?=li))){10,}/\1) In my test data that only matches against the third list. ---test file olli1/lili2/lili3li4li5/lili6/

Re: Grep help?

2009-03-26 Thread le...@gmail
On 26-Mar-2009, at 12:52, Ronald J Kimball wrote: On Thu, Mar 26, 2009 at 12:39:44PM -0600, le...@gmail wrote: On 26-Mar-2009, at 10:42, Ronald J Kimball wrote: (?s:([uo]l)[^]*\s*(?li[^]*.*?(?:/li\s*|(?=li))){10,}/\1) In my test data that only matches against the third list. ---test

Re: Grep help?

2009-03-26 Thread le...@gmail
On 26-Mar-2009, at 15:04, Jonathan Lundell wrote: On Mar 26, 2009, at 1:48 PM, le...@gmail wrote: Yes. Results of Find all http://home.kreme.com/grepresult.png If I split it all up into mcultiple lines, then the match works. All one line (like if the source had been saved in 'compact'

Grep help?

2009-03-25 Thread le...@gmail
I know I can do this with a negative look-ahead something or other, but despite years and years of regexs, I do not grok that particular mechanism. I want to search for lists that contain at least 10 list items. ol id=foo li class=bar... li... li class=boo... li... li... li... li... li...

Re: Grep help?

2009-03-25 Thread Patrick James
Hi Assuming each list element is on a new line as per your example I think that: ol.+\r(li.+\r){10,}/ol should select what is required. There's no need for negative lookahead. Above can be modified to include lists of more than one type, such a s ol or ul for example and if there are

<    1   2