Re: Need Grep Pattern

2024-02-15 Thread GP
Since your address parts have varying lengths, a simple grep replace pattern using fixed tabs isn't always going to produce the desired result. A solution is to use a perl script text filter. Using Brian Forte's grep seach expression in a perl script for a text filter, I came up with this:

Re: Need Grep Pattern

2024-02-15 Thread Kaveh Bazargan
I think the answer is probably above but here is one more: Search: *^(\d\d\/\d\d\/\d\d)\s(.+?)\s([0-9\.]+)$* Replace: *\1\t\2\t\3* Saved in Regex101 here . On Thu, 15 Feb 2024 at 17:43, Ted Burger wrote: > I am not that good with grep, so I would break this

Re: Need Grep Pattern

2024-02-15 Thread Ted Burger
I am not that good with grep, so I would break this down. Find: /23 (there is a space character at the end) Replace: /23\t Then Find: TX (there is a space at the end) Replace: TX\t Thanks, Ted *** Ted Burger t...@tobsupport.com

Re: Need Grep Pattern

2024-02-15 Thread Mike Pasini
Let's describe the pattern you are trying to split. There's more than one way to do that (as the replies to you query show) but by focusing on a general pattern (what must always be true about your original text), we can make a more reliable regexp. You want to capture everything up to the

Re: Need Grep Pattern

2024-02-15 Thread 'eu...@gmx.de' via BBEdit Talk
Hi Kim, Maybe this search pattern will help: ([\d\/]{8})( )([^\,]+)(\, TX )([\d\.]{1,5}) with replace pattern: \1\t\3\t\5 By the way: Try the pattern first wich the Pattern Playground (the 6th entry in BBEdits search menu). There’s also an extensive help on grep included. Cheers, Ulrich >

Re: Need Grep Pattern

2024-02-14 Thread Kim Mosley
Thanks. It worked for some but not all. It could have been my error. Kim > On Feb 14, 2024, at 6:06 PM, Jim Straus wrote: > > Search for: > ^([0-9]+/[0-9]+/[0-9]+) (.*) ([0-9.]+)$ > and replace with > \1\t\2\t\3 > and Replace all should do it. > -Jim Straus > > On Wed, Feb 14, 2024 at 5:05 PM

Re: Need Grep Pattern

2024-02-14 Thread Brian Forte
Kim, On Wed, 14 Feb 2024 14:44:27 -0800 (PST), Kim Mosley wrote: > I want to add tabs (or something else that might be better) so that > I can have three columns… date, vendor with city, and price. > 01/03/23 CENTRAL MARKET 61 AUSTIN, TX 45.00 > 01/04/23 H-E-B 425 AUSTIN, TX 74.62 > 01/09/23

Re: Need Grep Pattern

2024-02-14 Thread Jim Straus
Search for: ^([0-9]+/[0-9]+/[0-9]+) (.*) ([0-9.]+)$ and replace with \1\t\2\t\3 and Replace all should do it. -Jim Straus On Wed, Feb 14, 2024 at 5:05 PM Kim Mosley wrote: > I want to add tabs (or something else that might be better) so that I can > have three columns… date, vendor with city,

Need Grep Pattern

2024-02-14 Thread Kim Mosley
I want to add tabs (or something else that might be better) so that I can have three columns… date, vendor with city, and price. Can someone help? Thanks! 01/03/23 CENTRAL MARKET 61 AUSTIN, TX 45.00 01/04/23 H-E-B 425 AUSTIN, TX 74.62 01/09/23 CENTRAL MARKET 61 AUSTIN, TX 43.70 01/10/23

Need grep pattern please

2022-12-20 Thread Kim Mosley
I'd like to eliminate all the Saturdays Sunday, 1-January Monday, 2-January Tuesday, 3-January Wednesday, 4-January Thursday, 5-January Friday, 6-January Saturday, 7-January Sunday, 8-January Monday, 9-January Tuesday, 10-January Wednesday, 11-January Thursday, 12-January Friday, 13-January

Grep pattern needed.

2022-11-28 Thread Kim Mosley
Thanks so much!!! I have this (313 items): What would be the grep pattern so that I'd just see the author and the quote. Don’t feel disturbed by the thinking mind. You are not practicing to prevent thinking, but rather to recognize and acknowledge thinking whenever it arises.—Sayadaw U

Re: Grep Pattern Needed

2021-09-29 Thread John Delacour
On 28 Sep 2021, at 19:04, Kim Mosley wrote: > I'm looking for a grep pattern to put this data into 5 columns (though there > is no data for the "tags" column). Hopefully I can paste it into Excel. Now > it just goes into one column. Save this script as xx.pl in &qu

Re: Grep Pattern Needed

2021-09-28 Thread Corentin Cras-Méneur
28, 2021, at 14:04, Kim Mosley wrote: > > I'm looking for a grep pattern to put this data into 5 columns (though there > is no data for the "tags" column). Hopefully I can paste it into Excel. Now > it just goes into one column. > > Date > Description > Category

Grep Pattern Needed

2021-09-28 Thread Kim Mosley
I'm looking for a grep pattern to put this data into 5 columns (though there is no data for the "tags" column). Hopefully I can paste it into Excel. Now it just goes into one column. Date Description Category Tags Amount 9/28/2021 Central Market Groceries -$45.28 9/28/2021 Randalls

Re: GREP pattern for financial summary output

2021-05-21 Thread eu...@gmx.de
t;> >> My bank accounts have a save to CSV option in a single Amount column, such >> as the following: >> >> -2559.82 >> 1168.41 >> -12 >> -7.21 >> 23 >> >> I want to divide this into separate Credit & Debit columns, tab separated

Re: GREP pattern for financial summary output

2021-05-20 Thread Russell B
ll B : > > > My bank accounts have a save to CSV option in a single Amount column, such > as the following: > > -2559.82 > 1168.41 > -12 > -7.21 > 23 > > I want to divide this into separate Credit & Debit columns, tab separated, > such as > > Cre

Re: GREP pattern for financial summary output

2021-05-20 Thread eu...@gmx.de
> > I want to divide this into separate Credit & Debit columns, tab separated, > such as > > Credit | Debit > > 1168.41 | 2559.82 > > I can't create a robust GREP pattern to handle the existence or not of the > decimal values. Can someone provide a suit

GREP pattern for financial summary output

2021-05-20 Thread Russell B
My bank accounts have a save to CSV option in a single Amount column, such as the following: -2559.82 1168.41 -12 -7.21 23 I want to divide this into separate Credit & Debit columns, tab separated, such as Credit | Debit 1168.41 | 2559.82 I can't create a robust GREP pattern to ha

Re: GREP pattern to replace the first element with a tab

2021-03-25 Thread John Delacour
On 21 Mar 2021, at 08:39, samar wrote: > The reason you cannot reproduce the error with your file may be that the > second column is limited to three different texts (B1, B2, and B3) whereas in > mine there are more (up to B7 here, but the script should also work with more > than seven):

Re: GREP pattern to replace the first element with a tab

2021-03-22 Thread Kaveh Bazargan
text. Works here. On Mon, 22 Mar 2021 at 12:50, Tim A wrote: > Neat. > Any way to single step thru Find/Replace to watch the the grep pattern > progress instead of doing a Replace All? > If I do a Next and Replace it doesn't work properly. > > Thanks > > On Sunday, March 21

Re: GREP pattern to replace the first element with a tab

2021-03-22 Thread Tim A
Neat. Any way to single step thru Find/Replace to watch the the grep pattern progress instead of doing a Replace All? If I do a Next and Replace it doesn't work properly. Thanks On Sunday, March 21, 2021 at 5:42:16 AM UTC-7 Kaveh wrote: > Here is a two stage regex solution. Assum

Re: GREP pattern to replace the first element with a tab

2021-03-21 Thread Bruce Van Allen
On 21 Mar 2021, at 19:37, Christopher Stone wrote: On 03/21/2021, at 03:39, samar > wrote: The reason you cannot reproduce the error with your file may be that the second column is limited to three different texts (B1, B2, and B3) whereas in mine there are more

Re: GREP pattern to replace the first element with a tab

2021-03-21 Thread Christopher Stone
On 03/21/2021, at 03:39, samar mailto:arnet...@bluewin.ch>> wrote: > The reason you cannot reproduce the error with your file may be that the > second column is limited to three different texts (B1, B2, and B3) whereas in > mine there are more (up to B7 here, but the script should also work with

Re: GREP pattern to replace the first element with a tab

2021-03-21 Thread Kaveh Bazargan
Glad it helped Samar. Yes, I am generally afraid of lookaheads and sometime not sure of why we can't just use a pattern and replace it verbatim, but this is a good case for it because you have to ensure you do not select the start of the next line in the grep search. The thing I find hardest is

Re: GREP pattern to replace the first element with a tab

2021-03-21 Thread samar
Very clever! I had not thought of using positive lookahead, but this indeed makes GREP work here. The only thing I had to add was a tab character before the closing parenthesis in the first search so that similar A1 values (those beginning in the same way) will be excluded:

Re: GREP pattern to replace the first element with a tab

2021-03-21 Thread samar
Wow, thank you, Christian, that works exactly as expected! (I only needed to change the closing quotation mark for the script to run.) This is very helpful – my 8,000-line file was magically modified within 8 seconds. samar On Saturday, March 20, 2021 at 8:13:30 PM UTC+1 ChristianBoyce wrote:

Re: GREP pattern to replace the first element with a tab

2021-03-21 Thread Kaveh Bazargan
Here is a two stage regex solution. Assuming no bullets (•) in your file, Search: ^([^\t]+)\t([^\t]+)\r(?=\1) replace: \1\t\2\r• Search: •[^\t]+ Replace with empty On Sun, 21 Mar 2021 at 08:47, Christopher Stone wrote: > On 03/20/2021, at 15:48, John Delacour wrote: > > That makes no sense

Re: GREP pattern to replace the first element with a tab

2021-03-21 Thread samar
Hi Chris (For some reason my messages here occur only several hours after I've sent them ...) Thank you very much indeed – your AppleScript works perfectly well here (8 seconds when applied to my file of 8,000 lines), the result is the same as when I run Christian's script. So I can even

Re: GREP pattern to replace the first element with a tab

2021-03-21 Thread samar
The reason you cannot reproduce the error with your file may be that the second column is limited to three different texts (B1, B2, and B3) whereas in mine there are more (up to B7 here, but the script should also work with more than seven): A1B1 A1B2 A1B3 A1B4 A1B5 A1

Re: GREP pattern to replace the first element with a tab

2021-03-21 Thread Christopher Stone
On 03/20/2021, at 15:48, John Delacour mailto:johndelac...@gmail.com>> wrote: > That makes no sense to me. If the current col1 is identical to col1 of the > previous line, then the value will not be printed; that is the clear logic of > the routine. I cannot reproduce your error. Hey Folks,

Re: GREP pattern to replace the first element with a tab

2021-03-20 Thread John Delacour
On 20 Mar 2021, at 16:33, samar mailto:arnet...@bluewin.ch>> wrote: > ...when I run the text filter, not all occurrences of the first element get > replaced when necessary: > > > > Here a tab should also replace A1 in line 5, A2 in line 12, and A3 in line 18. That makes no sense to me. If

Re: GREP pattern to replace the first element with a tab

2021-03-20 Thread Christian Boyce
You asked for GREP, and this isn’t GREP, but it still solves your problem. I used AppleScript. Note: this script is written in order to be as easy to follow as possible. It could be improved of course. Basically I’m going down your document a line at a time, comparing what’s on the left

Re: GREP pattern to replace the first element with a tab

2021-03-20 Thread samar
Thank you! This is helpful, and the result better than mine was. However, when I run the text filter, not all occurrences of the first element get replaced when necessary: [image: tab3.png] Here a tab should also replace A1 in line 5, A2 in line 12, and A3 in line 18. Thanks samar On

Re: GREP pattern to replace the first element with a tab

2021-03-20 Thread John Delacour
On 20 Mar 2021, at 11:30, samar wrote: > I'm looking for something which I assume is pretty easy to accomplish with > GREP but I fail to see how. > > I have a large text file with entries sorted in this way: > > ...That is, the first element is replaced by a tab character *if* the first >

GREP pattern to replace the first element with a tab

2021-03-20 Thread samar
Hi This is the first time a post a message here. I'm looking for something which I assume is pretty easy to accomplish with GREP but I fail to see how. I have a large text file with entries sorted in this way: [image: tab1.png] That is, each line has two elements (represented here by A\d and

Re: grep pattern to find special combinations of fields in a large csv file

2020-07-29 Thread David G Wagner
You will have in history and you can use the script editor to record your actions, save that output and execute. Personally a Perl individual, but you should be able to follow the shooting... A thought... Wags ;) WagsWorld Hebrews 4:15 Ph(primary) : 408-914-1341 Ph(secondary): 408-761-7391 On

Re: grep pattern to find special combinations of fields in a large csv file

2020-07-29 Thread Lewis Downey
Neil, face, No doubt you are right. By now i should be perfectly comfortable building and querying MySQL tables. However so far I have punted on learning SQL. Same for Perl. It could still happen, maybe... Thanks for the replies. (still curious if grep could find the correct results.) --

Re: grep pattern to find special combinations of fields in a large csv file

2020-07-29 Thread Lewis Downey
Robin, Your text filter works like a charm! The results are in some kind of funky order but accurate. The filter barely took moments to runs - a gigantic improvement. I have not yet found a way to script the application of the filter, but if that never happens spending 60 seconds to run the

Re: grep pattern to find special combinations of fields in a large csv file

2020-07-29 Thread face
t 6:56:03 AM UTC-7, Lewis Downey wrote: > > Hello! > > I do not know where to start to put together a grep pattern that will > parse a 375,000+ line csv file in a specific way for a personal project. > The file is publicly available from the NY Times and contains data > rela

Re: grep pattern to find special combinations of fields in a large csv file

2020-07-29 Thread Robin Beech
ces for(key in firstoccurrences) { print firstoccurrences[key]; } } On Wednesday, July 29, 2020 at 9:56:03 AM UTC-4, Lewis Downey wrote: > > Hello! > > I do not know where to start to put together a grep pattern that will > parse a 375,000+ line csv file in a specific way for a personal project. >

Re: grep pattern to find special combinations of fields in a large csv file

2020-07-29 Thread Neil Faiman
gt; Hello! > > I do not know where to start to put together a grep pattern that will parse a > 375,000+ line csv file in a specific way for a personal project. The file is > publicly available from the NY Times and contains data related to tracking > Covid-19 > <https://gi

grep pattern to find special combinations of fields in a large csv file

2020-07-29 Thread Lewis Downey
Hello! I do not know where to start to put together a grep pattern that will parse a 375,000+ line csv file in a specific way for a personal project. The file is publicly available from the NY Times and contains data related to tracking Covid-19 <https://github.com/nytimes/covid-19-data/b

Re: Applescript to replace selected text only using grep pattern

2018-10-20 Thread Christian Boyce
Wow, Chris, that's much better. Thank you. C > On Oct 19, 2018, at 3:37 PM, Christopher Stone > wrote: > > > Hey Christian, > > That can be simplified a bit. :) > > tell application "BBEdit" > tell selection to replace using "calc(" & its text & " *

Re: Applescript to replace selected text only using grep pattern

2018-10-19 Thread Christopher Stone
On 10/14/2018, at 23:04, Christian Boyce mailto:mac...@christianboyce.com>> wrote: > I know you already have an answer but I think it's good to know how to > restrict an AppleScript "replace" in BBEdit to the selected text. I had this > problem myself once. > > This is how I'd do it (and it

Re: Applescript to replace selected text only using grep pattern

2018-10-14 Thread Christian Boyce
:56 AM, Kevin Bolduan wrote: > > I'd like to have a keyboard shortcut that allows me to highlight a selection > and have it be replaced using a grep pattern that uses the selection. I'm > writing some CSS and I need to convert various font-size declarations as > follows: > >

Re: Applescript to replace selected text only using grep pattern

2018-10-14 Thread Kevin Bolduan
few other things, too! thanks, -Kevin On Sunday, October 14, 2018 at 7:39:32 AM UTC-7, Kevin Bolduan wrote: > > I'd like to have a keyboard shortcut that allows me to highlight a > selection and have it be replaced using a grep pattern that uses the > selection. I'm writi

Re: Applescript to replace selected text only using grep pattern

2018-10-14 Thread Rich Siegel
On 10/14/18 at 3:56 AM, kevin.bold...@gmail.com (Kevin Bolduan) wrote: I can't do a global search-and-replace and would like a quick and easy way to type "2rem" (or any other value), select it, press the keyboard shortcut, and have it change to calc(2rem * .625). I should think a clipping

Applescript to replace selected text only using grep pattern

2018-10-14 Thread Kevin Bolduan
I'd like to have a keyboard shortcut that allows me to highlight a selection and have it be replaced using a grep pattern that uses the selection. I'm writing some CSS and I need to convert various font-size declarations as follows: 2rem -> calc(2rem * .625) I can't do a global sea

Re: Grep Pattern

2017-08-28 Thread Sam Hathaway
If we're golfing, why not: Find: .*\. Replace: (Note that there's a space at the end of the find pattern and the replacement string is empty.) Hope this helps! -sam On 28 Aug 2017, at 9:47 AM EDT, Jim Danner wrote: Or, if there's a chance that the text after the last period-and-space

Re: Grep Pattern

2017-08-28 Thread Jim Danner
Or, if there's a chance that the text after the last period-and-space will itself contain a space, find ^.*\. ([^.]+)$ and replace it with \1 (It finds 'stuff that does not contain any periods' after a period-and-space.) On Monday, August 28, 2017 at 3:24:57 PM UTC+2, T Burger wrote: > >

Re: Grep Pattern

2017-08-28 Thread Ted Burger
Find = ^.* (.*)$ Replace = \1 Thanks, Ted *** Ted Burger t...@tobsupport.com * www.tobsupport.com > On Aug 27, 2017, at 12:19 AM, Jasyn Jones wrote: > > I have a text file with 2000 lines of text similar to

Grep Pattern

2017-08-28 Thread Jasyn Jones
I have a text file with 2000 lines of text similar to this: baba /baˈba/ nm. mother bats /bats/ nf. test; v. test bei /bei/ v. keep What I want to do is to find and replace everything up to and including the last period & space, on every line, so the output would look like: mother test keep

Re: Help with a GREP pattern

2017-06-01 Thread Tom
Hey Chris, \x0D or \x{0D} or \x{000D} > Look on page 149 of the manual in Chapter 7: Searching. you are right, they even give a literal example for CR (p. 171). I’m deeply ashamed: as a technical writer, making my living writing manuals, I *really should* read other people’s manuals ;) –

Re: Help with a GREP pattern

2017-06-01 Thread Christopher Stone
On 06/01/2017, at 03:28, Tom > wrote: > If you really mean Carriage Return (CR) then I don’t think this can be forced > with a regex in BBEdit. Hey Tom, Sure it can, although the method is not exactly obvious. \x0D or \x{0D} or \x{000D} Look on page 149 of

Re: Help with a GREP pattern

2017-06-01 Thread Tom
at 1:56:19 PM UTC+2, mrcmrc wrote: > > Hi all, > I need some help in order to create a GREP pattern that let me transform a > text file. In this text file there are a list of glossary terms like this: > > acceptor — A dopant material, such as boron, which has fewer outer shell

Re: Help with a GREP pattern

2017-06-01 Thread fgf
On Wednesday, May 31, 2017 at 7:56:19 AM UTC-4, mrcmrc wrote: > > Hi all, > I need some help in order to create a GREP pattern that let me transform a > text file. In this text file there are a list of glossary terms like this: > > Sam's approach did not work for me whe

Re: Help with a GREP pattern

2017-05-31 Thread Sam Hathaway
Hi Marco, I think this will work. Find: (.*?) — .*\r+ Replace: \1\r Hope it helps! -sam On 31 May 2017, at 5:05 AM EDT, mrcmrc wrote: Hi all, I need some help in order to create a GREP pattern that let me transform a text file. In this text file there are a list of glossary terms like

Help with a GREP pattern

2017-05-31 Thread mrcmrc
Hi all, I need some help in order to create a GREP pattern that let me transform a text file. In this text file there are a list of glossary terms like this: acceptor — A dopant material, such as boron, which has fewer outer shell electrons than required in an otherwise balanced crystal

Re: Help With Grep Pattern

2017-03-05 Thread Dave
If you install the PCRE libraries you get tons of documentation in HTML and manpage format. It also includes some useful demos and utilities. Of course you can also link to them when you build gnu grep, sed and other programs with PCRE dependencies. http://www.pcre.org -- This is the BBEdit

Re: Help With Grep Pattern

2017-03-04 Thread Ole Kristian Ek Hornnes
Thank you - That one was a good one. Herby bookmarked for later use. - Ole Kristian Ek Hornnes lørdag 4. mars 2017 05.45.38 UTC+1 skrev Steve Piercy følgende: > > Another nice online tool with more features, including an > explanation and highlighting of regex syntax, a larger library > of

Re: Help With Grep Pattern

2017-03-03 Thread Bill Kochman
Thank you Steve. That tool is also very helpful. Even though I have read the BBEdit manual’s section regarding grep patterns a number of times over the years, regex and grep patterns has remained a “mystery language” to me, never fully understanding how to put the pieces of the puzzle together

Re: Help With Grep Pattern

2017-03-03 Thread Steve Piercy
Another nice online tool with more features, including an explanation and highlighting of regex syntax, a larger library of regexes, and an IRC channel is this one: https://regex101.com/ --steve On 3/4/17 at 11:39 AM, wordweaver...@gmail.com (Bill Kochman) pronounced: Hello Ole Kristian,

Re: Help With Grep Pattern

2017-03-03 Thread Bill Kochman
Hello Ole Kristian, Thank you so much for the link. That Regex Pal tool is indeed very helpful to me. Kind regards, Bill K. > On Mar 4, 2017, at 7:08 AM, Ole Kristian Ek Hornnes > wrote: > > Hello, > > I am often using http://www.regexpal.com to test out reg-ex

Re: Help With Grep Pattern

2017-03-03 Thread Ole Kristian Ek Hornnes
Hello, I am often using http://www.regexpal.com to test out reg-ex patterns. This also contains a handy list of codes, and gives you the opportunity to test the reg-ex before using it in BBEdit Search/Replace or Multi File Search/Replace.

Re: Help With Grep Pattern

2017-02-26 Thread Bill Kochman
Hello Tom, Thank you very much for that explanation. Yes, it is very helpful and will help me to write more complex patterns. Earlier this morning I was looking through the greg section of the BBEdit manual, trying to find what I was referring to as a “not operator”. I even checked online,

Re: Help With Grep Pattern

2017-02-26 Thread Tom Robinson
Normally relative links are a better way to run a site — you can move pages to a different host, put them in sub-directories, etc., without changing the HTML. > >> And I'd replace with: >> >> https://www.billkochman.com/Articles/\1 >> >> Jean-Christophe -- This is the BBEdit Talk public

Re: Help With Grep Pattern

2017-02-26 Thread Bill Kochman
Hello Jean-Christophe, Thank you for your assistance. I appreciate it. Using that grep pattern found only ONE relative URL in almost 6,000 HTML docs. Considering how much I have used BBEdit’s multi-file find and replace feature to make global changes to my primary virtual host over the past

Re: Help With Grep Pattern

2017-02-26 Thread Jean-Christophe Helary
Bill, > https://www.billkochman.com/Articles/my-article.html > > https://www.billkochman.com/Articles/;. > If I use this: > > \t\t there because all such lines are prefixed by two tabs. There is not need to check for the presence of tabs since what you want concerns only the URL. Since the

Help With Grep Pattern

2017-02-26 Thread Bill Kochman
Hello again, I want to convert all of my relative URLs to absolute URLs. The problem is that I do not know where the remaining relative URLs are located in my virtual host's folder. I have been reading the grep patterns section of the BBEdit manual, but I still haven't quite understood how to

Re: grep pattern decode quoted-printable

2016-08-13 Thread irep
Le vendredi 12 août 2016 23:27:51 UTC+2, Ronald J Kimball a écrit : > > It looks like you used encode instead of decode. > Ronald > Thank you Ronald. I need to erase a part of the script to solely decode? :D Silly me… -- This is the BBEdit Talk public discussion group. If you have a

Re: grep pattern decode quoted-printable

2016-08-12 Thread Ronald J Kimball
On Wed, Aug 10, 2016 at 02:27:26AM -0700, irep wrote: > Thank you very much Rich and Charlie > > @Rich > > I did what you wrote and placed it as a .py file in Applications > support>BBedit>Text Filters. > In BBedit, I can see the new menu item and use it but the quoted-printable > characters

Re: grep pattern decode quoted-printable

2016-08-10 Thread Charlie Garrison
On 10 Aug 2016, at 19:27, irep wrote: I did this in Terminal and got a huge log with a lot of external connections (to mirrors): I don’t install stuff into the system perl, so not sure how to help with those errors. I use perlbrew for a custom Perl installation for each project, and

Re: grep pattern decode quoted-printable

2016-08-10 Thread irep
Thank you very much Rich and Charlie @Rich I did what you wrote and placed it as a .py file in Applications support>BBedit>Text Filters. In BBedit, I can see the new menu item and use it but the quoted-printable characters get coded differently but still not showing accents (dyacritics signs)

Re: grep pattern decode quoted-printable

2016-08-09 Thread Charlie Garrison
On 10 Aug 2016, at 9:56, irep wrote: How can I decode quoted-printable paragraphs or the whole text in say UTF8 with BBedit 11 or TextWrangler ?  I am totally newbie with grep. I thought one could find a kind of "shared library" filled with grep patterns to do this :) I have found tools

Re: grep pattern decode quoted-printable

2016-08-09 Thread Rich Siegel
On Tuesday, August 9, 2016, irep wrote: How can I decode quoted-printable paragraphs or the whole text in say UTF8 with BBedit 11 or TextWrangler ? You can do this in Python with the "quopri" package: . A simple

grep pattern decode quoted-printable

2016-08-09 Thread irep
Hello. How can I decode quoted-printable paragraphs or the whole text in say UTF8 with BBedit 11 or TextWrangler ? I am totally newbie with grep. I thought one could find a kind of "shared library" filled with grep patterns to do this :) I have found tools online but its not so handy. Thank

Re: Grep pattern for multi line /* ... */ blocks

2012-10-01 Thread kt
Thanks Kendall I'll check out those compressors I tried the grep, but it matched the entire contents of the file. There were only 2 lines left after it was done. I'll try tweaking it a bit more. Ken On Sunday, September 30, 2012 3:15:05 PM UTC-4, Kendall Conrad wrote: One indirect

Re: Grep pattern for multi line /* ... */ blocks

2012-10-01 Thread Bruce Van Allen
On 9/30/12 at 1:05 PM, fredsays...@gmail.com (kt) wrote: Thanks Kendall I'll check out those compressors I tried the grep, but it matched the entire contents of the file. There were only 2 lines left after it was done. I'll try tweaking it a bit more. One direct solution: Find:

Grep pattern for multi line /* ... */ blocks

2012-09-30 Thread kt
Hi I've been futzing around with grep for nearly an hour and can't figure out how to grep multi-line /* ... */ blocks. I have a large Javascript source file with tons of single and multi line comments and I want to strip them all out to reduce file size. I got the single line grep working

Re: Grep pattern for multi line /* ... */ blocks

2012-09-30 Thread Kendall Conrad
One indirect solution: There's tools for compressing JavaScript files (minifiers). These strip comments and remove all unnecessary white space, which results in much smaller files. I use YUI Compressor for my JS and CSS files saving to -min.js file names. This might be the better approach in

Re: grep pattern for NOT capturing a zip code at the first of a line?

2012-07-09 Thread Roland Küffner
the zip codes and only find the lines that do not begin with a zip code. Once those lines are located I want to remove the return at the end of the previous line and replace it with a space. Every GREP pattern I have tried to use always finds the zip code as well. There are tabs only after

grep pattern for NOT capturing a zip code at the first of a line?

2012-07-08 Thread Mosby
with a zip code. Once those lines are located I want to remove the return at the end of the previous line and replace it with a space. Every GREP pattern I have tried to use always finds the zip code as well. There are tabs only after the zip codes, no tabs are found on the other lines. Thanks

Re: grep pattern for NOT capturing a zip code at the first of a line?

2012-07-08 Thread David Kelly
the zip codes and only find the lines that do not begin with a zip code. Once those lines are located I want to remove the return at the end of the previous line and replace it with a space. Every GREP pattern I have tried to use always finds the zip code as well. There are tabs only after

Re: grep pattern for NOT capturing a zip code at the first of a line?

2012-07-08 Thread Patrick Woolsey
at the end of the previous line and replace it with a space. Every GREP pattern I have tried to use always finds the zip code as well. There are tabs only after the zip codes, no tabs are found on the other lines. If I understand the task correctly, try something like this: Find: \r([^\t

Re: grep pattern for NOT capturing a zip code at the first of a line?

2012-07-08 Thread Christopher Stone
On Jul 08, 2012, at 06:59, Mosby wrote: I have data that looks similar to this... ... I want to skip the zip codes and only find the lines that do not begin with a zip code... __ Hey There, There are a few ways to tackle

Would like GREP pattern

2011-12-13 Thread Kim Mosley
In 11. Aki Matsuri, Japan America Society of Austin, Austin, TX. (1994, October 22, lecture, with demonstration by Noriko Takayama Sensei). and similar events, I want to switch the year and the month/day. So (1994, October 22 becomes (October 22, 1994, Can someone help? Thanks, Kim --

Re: Would like GREP pattern

2011-12-13 Thread Ben Smith
Hmm, could try: Find: \((\d\d\d\d),\s*(.*?), Replace: (\2, \1, -- 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

Re: Would like GREP pattern

2011-12-13 Thread Kim Mosley
Thanks... that did the job! Kim On Dec 13, 8:34 am, Ben Smith benpto...@gmail.com wrote: Hmm, could try: Find: \((\d\d\d\d),\s*(.*?), Replace: (\2, \1, -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group,

Re: Need help with complex GREP pattern

2011-12-11 Thread Ronald J Kimball
David sent me a long test file off-list. Here's an improved regex that works in BBEdit: (?mx) (^THIS\ IS\ TRIP\ NUMBER.*\r (?:\S.*\r)* \r (?(?: (?:[ \t]*\d.*\r)+ [ \t]*-+.*\r )*) (?:[ \t]*\d.*\r){3} [ \t]*\(.*\rTHE\ CALCULATED\ CREW\ COST.*\r ) I just had to add (? ) around the

Re: Need help with complex GREP pattern

2011-11-30 Thread David
Ronald, Thanks. What would be the best way to edit your regex so I can simply paste it into the BBEdit find dialog box? -- 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

Re: Need help with complex GREP pattern

2011-11-30 Thread Ronald J Kimball
On Wed, Nov 30, 2011 at 09:46:51AM -0800, David wrote: Ronald, Thanks. What would be the best way to edit your regex so I can simply paste it into the BBEdit find dialog box? I am not in front of a Mac at present, but I believe it should work in BBEdit as is. Ronald -- You received this

Re: Need help with complex GREP pattern

2011-11-30 Thread Ronald J Kimball
Now that I'm in front of a Mac, if I change each \n to \r, as Doug advised, the regex does indeed work in BBEdit. (?mx) (^THIS\ IS\ TRIP\ NUMBER.*\r # initial header (?:\S.*\r)* # any additional headers \r

Need Help with Forumlating Grep Pattern.

2010-09-09 Thread Miles
Hi. I have data from a OUTLOOK export that's been corrupted. It appears that Outlook is putting extraneous data from the NOTES field into the TITLE field of the export, which ends up column shifting the resulting records that follow the first record. Look at the sample data below: its column

Re: Grep Pattern

2009-09-16 Thread Tom007
Thank you, Ronald. It works :-) --~--~-~--~~~---~--~~ 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

Re: Grep Pattern

2009-09-15 Thread Ronald J Kimball
On Tue, Sep 15, 2009 at 06:26:05AM -0700, Tom007 wrote: I use this Grep Pattern and need to replace this snippets that are a lot in the webpage: FIND THIS: /FONTFONT color=#ff class=vers P align=justify n /FONT AND REPLACE TO THIS: span class=vers n /span Which Grep

grep pattern

2008-12-20 Thread outis
Hello, I'm trying to use the 'replace all' thing in the text factories with a grep pattern. I have a XeTeX document that I'd like to strip the coding from and convert into a .html file. What would the syntax be to replace: {\RL {\ezr Bunches of Hebrew words here}} with: p class=P8Bunches

Re: grep pattern

2008-12-20 Thread John Delacour
At 12:23 -0800 20/12/08, outis wrote: What would the syntax be to replace: {\RL {\ezr Bunches of Hebrew words here}} with: p class=P8Bunches of Hebrew words here/p How would I replace everything on either side of the text: the {\RL {...}} syntax with the .html-like ... syntax? Try :

Re: grep pattern

2008-12-20 Thread Patrick James
That's a better expression than the one I suggested. I forgot the ezr :( Also \s+ is flexible in the space department. Patrick http://www.patrickjames.co.uk On 20 Dec 2008, at 21:16, John Delacour wrote: Try : Search for something like this {\\RL\s+{\\ezr\s+([^}]+)}}

Re: Grep Pattern

2008-12-19 Thread Patrick James
Hi You might like to try this: Find: (col id=1.+/)col Replace: \01company From this Find/Replace expression you can probably guess what is going on. . matches any character except return and + is a quantifier meaning one or more times. It will do this up to /col because that is

Fwd: Grep Pattern

2008-12-19 Thread Patrick James
://www.patrickjames.co.uk Begin forwarded message: From: Patrick James pjl...@gmail.com Date: 19 December 2008 17:07:24 GMT To: bbedit@googlegroups.com Subject: Re: Grep Pattern Hi You might like to try this: Find: (col id=1.+/)col --~--~-~--~~~---~--~~ You

  1   2   >