Re: GREP cleanup

2019-12-08 Thread jgill
Thank you Bruce, I used to know this but, at 74, sometimes I need a reminder. On Sunday, December 8, 2019 at 5:30:05 PM UTC, Bruce Van Allen wrote: > > On 12/8/19 at 4:52 AM, joegille...@gmail.com (jgill) wrote: > > >I need to clean up some OCR documents to find characters that > >are NOT

Re: GREP cleanup

2019-12-08 Thread Bruce Van Allen
On 12/8/19 at 4:52 AM, joegillespie2...@gmail.com (jgill) wrote: I need to clean up some OCR documents to find characters that are NOT [A-Z|a-z|0-9|:] What is the BBEdit GREP syntax for an invered search (-v) ? [^A-Za-z0-9:] The above character class includes the characters you want, and

GREP cleanup

2019-12-08 Thread jgill
I need to clean up some OCR documents to find characters that are NOT [A-Z|a-z|0-9|:] What is the BBEdit GREP syntax for an invered search (-v) ? -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "supp...@barebones.com"

Re: GREP Cleanup

2011-05-10 Thread steveax
On May 9, 7:29 am, Robert Huttinger roberthuttin...@gmail.com wrote: ok after playing around I got the solution!! #! /usr/bin/perl use strict; use warnings; while (){        s/([-a-z ]+:([^link|visited|hover|active]))\s*(.*)/sprintf(%-32s,$1) . $3/ie;        print; } Those are the

Re: GREP Cleanup

2011-05-10 Thread Ronald J Kimball
On Mon, May 09, 2011 at 10:29:55AM -0400, Robert Huttinger wrote: s/([-a-z ]+:([^link|visited|hover|active]))\s*(.*)/sprintf(%-32s,$1) . $3/ie; FYI, [^link|visited|hover|active] does not do what I presume you think it does. [] is a character class, which matches exactly one character.

Re: GREP Cleanup

2011-05-10 Thread Robert Huttinger
oh!! do I need (link|visited|hover|active) ? bo On Tue, May 10, 2011 at 4:20 PM, Ronald J Kimball r...@tamias.net wrote: On Mon, May 09, 2011 at 10:29:55AM -0400, Robert Huttinger wrote: s/([-a-z ]+:([^link|visited|hover|active]))\s*(.*)/sprintf(%-32s,$1) . $3/ie; FYI,

Re: GREP Cleanup

2011-05-10 Thread Ronald J Kimball
On Tue, May 10, 2011 at 04:22:21PM -0400, Robert Huttinger wrote: oh!! do I need (link|visited|hover|active) ? I'm not actually sure what you want that part of the regex to do. :) Ronald -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google

Re: GREP Cleanup

2011-05-10 Thread Robert Huttinger
I thought I had gotten it to ignore those words. so anything that looked like :link || :active etc ignore those lines. thanks! bo On Tue, May 10, 2011 at 4:46 PM, Ronald J Kimball r...@tamias.net wrote: On Tue, May 10, 2011 at 04:22:21PM -0400, Robert Huttinger wrote: oh!! do I need

Re: GREP Cleanup

2011-05-10 Thread Bruce Van Allen
On 2011-05-10, Robert Huttinger wrote: oh!! do I need (link|visited|hover|active) ? That would work for those. But I suggest that you re-read my previous post, in which I suggested that you change only one character from the regular expression in your earlier try: Change the script line

Re: GREP Cleanup

2011-05-10 Thread Bruce Van Allen
On 2011-05-10, Bruce Van Allen wrote: On 2011-05-10, Robert Huttinger wrote: oh!! do I need (link|visited|hover|active) ? That would work for those. But I suggest that you re-read my previous post, in which I suggested that you change Oops I missed where you had that

Re: GREP Cleanup

2011-05-10 Thread Ronald J Kimball
On Tue, May 10, 2011 at 04:55:25PM -0400, Robert Huttinger wrote: I thought I had gotten it to ignore those words. so anything that looked like :link || :active etc ignore those lines. Okay, you could do something like this: #! /usr/bin/perl use strict; use warnings; while (){ s/^([-a-z

Re: GREP Cleanup

2011-05-10 Thread Robert Huttinger
@bruce @ronald: Noted! good points both and Ill have to start using the forward lookup. Good stuff, and Ill give it a go! cheers.bo On May 10, 2011, at 5:24 PM, Ronald J Kimball wrote: On Tue, May 10, 2011 at 04:55:25PM -0400, Robert Huttinger wrote: I thought I had gotten it to ignore

Re: GREP Cleanup

2011-05-09 Thread Robert Huttinger
so the filter doesnt work.. and I am ok at regex, but not at perl, can someone help me close out this issue? so this is the filter: #! /usr/bin/perl use strict; use warnings; while (){ s/([-a-z ]+:)\s+(.+)/sprintf(%-20s,$1) . $2/ie; print; } this is the css: .tlLinkSubQuarter {

Re: GREP Cleanup

2011-05-09 Thread Robert Huttinger
ok after playing around I got the solution!! #! /usr/bin/perl use strict; use warnings; while (){ s/([-a-z ]+:([^link|visited|hover|active]))\s*(.*)/sprintf(%-32s,$1) . $3/ie; print; } I hope this helps someone else!! cheers.bo On Mon, May 9, 2011 at 9:32 AM, Robert

Re: GREP Cleanup

2011-05-07 Thread Robert Huttinger
while (){ s/([-a-z ]+:)\s+(.+)/sprintf(%-20s,$1) . $2/ie; print; } So the first group is all up to the colon, then the next group starts at char 20? Ten the flags i e Thanks a ton!! I have had to convert lots of CSS and this makes it so much cleaner. Cheers.Bo Squeezed

GREP Cleanup

2011-05-06 Thread Bo
Hey all, Its a little nitpicky, but I am doing some code cleanup, and I want to format my css include file to go from this: [code] \twidth:85%; \tmargin:0 auto; \tpadding:10px; \tposition:relative; to \twidth:\t\t\t85%; \tmargin:\t\t0 auto; \tpadding:\t\t10px; \tposition:\t\trelative; [/code]

Re: GREP Cleanup

2011-05-06 Thread Bucky Junior
On May 6, 2011, at 9:40 AM, Bo wrote: I want to format my css include file to go from this: [code] \twidth:85%; ... to \twidth:\t\t\t85%; ... so it all aligns in columns, is there an adcanced regex function i can use, or a reflow document preference that can be manually set on a per

Re: GREP Cleanup

2011-05-06 Thread Robert Huttinger
sometimes though you have a long selector: color: #CCC; background-image: transparent url('foo/frack.png') no-repeat top left; If i just add 2 tabs, they values of the attributes will not line up. there will be space between them but they wont line up. Ideally I want the regex or reflow to but

Re: GREP Cleanup

2011-05-06 Thread Bucky Junior
On May 6, 2011, at 3:53 PM, John Delacour wrote: At 17:28 -0400 06/05/2011, you wrote: Ideally I want the regex or reflow to but the attribut , for instance, on char 4, and all the values on char 60. does that make sense? It might make more sense if you wrote out some pseudo-code

Re: GREP Cleanup

2011-05-06 Thread Robert Huttinger
Without linking to a screen shot, it's hard to explain. But that is close. Yeah it may be a little more complicated but I was also hopping the might be a document reflow that would help. Bo Sent from my Commodore 64 On May 6, 2011, at 8:09 PM, Bucky Junior buckyjunior...@googlemail.com wrote: