Re: Grep -- How to match segment containing many lines

2007-05-15 Thread Sivakatirswami
I went into production with the script below where. The benchmark on this I thought was impressive, so I thought to share it: The fld "findChunk" has the grep string: (?s)(.*?) the fileList has a list of paths already chosen for files to be operated on. in this case 647 files. Intel mac runni

Re: Grep -- How to match segment containing many lines

2007-05-12 Thread Ken Ray
> does it... and I found the section in the BBEdit help on > "Perl-Style Pattern Extensions" where all this is > explained... > > "s allow. to match \r" > > Marvelous! The unintuitive part is that this pattern > or "toggle" must begin the entire expression. For more on how Rev handles it

Re: Grep -- How to match segment containing many lines

2007-05-12 Thread Sivakatirswami
Jim Ault wrote: you should look at the (?) directive syntax such as (?i) = case sensitive (?si) = ignore line endings + case sensitive (?Usi) = ungreedy + ignore + sensitive I think you want [greedy + ignore line endings] so use put "(?s)(.*?)" into regEx get matchChunk(textBlock,regEx,charpos

Re: Grep -- How to match segment containing many lines

2007-05-12 Thread Jim Ault
you should look at the (?) directive syntax such as (?i) = case sensitive (?si) = ignore line endings + case sensitive (?Usi) = ungreedy + ignore + sensitive I think you want [greedy + ignore line endings] so use put "(?s)(.*?)" into regEx get matchChunk(textBlock,regEx,charpos1,charpos2) delete

Re: Grep -- How to match segment containing many lines

2007-05-12 Thread Klaus Major
Hi Swami, I want to replace a chunk many files # lots of other stuff here, many lines all inconsistent across many files## (.*?) (.*) isn't working... I suspect because of the many lines issue and I am having trouble finding the answer to how to get grep to ignore line endings? I'm sure i

Grep -- How to match segment containing many lines

2007-05-12 Thread Sivakatirswami
I want to replace a chunk many files # lots of other stuff here, many lines all inconsistent across many files## (.*?) (.*) isn't working... I suspect because of the many lines issue and I am having trouble finding the answer to how to get grep to ignore line endings? I'm sure it's really s