Re: Noob trying to improve on these grep / expressions

2019-01-05 Thread Rails Smith
What fun thread! I find Rubular to be helpful for iterating on regex development. It is similar to the app mentioned in the App store. -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email

Re: Noob trying to improve on these grep / expressions

2019-01-05 Thread Christopher Stone
On 01/04/2019, at 20:59, Dj mailto:futurevint...@gmail.com>> wrote: > The last couple things I'm curious about before doing a deeper dive... To > remove all text between paranthesis (and also the parenthesis), what would > that expression be? Hey Dj, Something like this: \([^)]+\) 1.

Re: Noob trying to improve on these grep / expressions

2019-01-05 Thread F. Alfredo Rego
Hey Chris, Great news for all of us. I got RegExRX from the App Store. Thanks. Alfredo > On Jan 5, 2019, at 12:39 PM, Christopher Stone > wrote: > > On 01/04/2019, at 13:44, F. Alfredo Rego > wrote: >> RegExRX seems to have gone dormant five years ago. >>

Re: Noob trying to improve on these grep / expressions

2019-01-05 Thread Christopher Stone
On 01/04/2019, at 13:44, F. Alfredo Rego mailto:f.alfredor...@gmail.com>> wrote: > RegExRX seems to have gone dormant five years ago. > Do you have any news/updates regarding newer/better approaches, if any? Hey Alfredo, Good news – I heard back from Kem Tekinay the developer of RegExRX (see

Re: Noob trying to improve on these grep / expressions

2019-01-05 Thread DavidWeinberger
> suggest a book on getting better at expressions and BBedit? I think you're asking specifically about regex, but if you're looking for a book about how to get the most out of BBedit overall, I recommend Glenn Fleishman's "Take Control of BBedit." It's several revs behind (it assumes BBedit v.

Re: Noob trying to improve on these grep / expressions

2019-01-04 Thread Dj
Ah! It was your cheatsheet that I have been studying, somehow I didn't connect the name here and there. Thankful I asked in the right place, I wasn't expecting a masterclass  . I've put what you suggested in notes and will use them as a good jumping off point along with your book. The last

Re: Noob trying to improve on these grep / expressions

2019-01-04 Thread F. Alfredo Rego
Thanks, Chris. I really appreciate (and enjoy) every one of your wise contributions. Alfredo > On Jan 4, 2019, at 12:58 PM, Christopher Stone > wrote: > > On 01/04/2019, at 13:44, F. Alfredo Rego > wrote: >> RegExRX seems to have gone dormant five years ago.

Re: Noob trying to improve on these grep / expressions

2019-01-04 Thread Christopher Stone
On 01/04/2019, at 13:44, F. Alfredo Rego mailto:f.alfredor...@gmail.com>> wrote: > RegExRX seems to have gone dormant five years ago. > > Do you have any news/updates regarding newer/better approaches, if any? Hey Alfredo, Crud. I didn't realize it was a 32-bit app. You can find it here:

Re: Noob trying to improve on these grep / expressions

2019-01-04 Thread F. Alfredo Rego
Hey Chris, RegExRX seems to have gone dormant five years ago. Do you have any news/updates regarding newer/better approaches, if any? Thanks. Alfredo > On Jan 4, 2019, at 12:10 PM, Christopher Stone > wrote: > > Tools like BBEdit , Patterns >

Re: Noob trying to improve on these grep / expressions

2019-01-04 Thread Dj
Oh man, I was really overthinking it trying to turn it into an executable. Got it working and this is very cool. Appreciate you spelling it out so well and getting me on track! Couple more quick things: would it be hard to do one that only extracts text that is within quotation marks? I tried

Re: Noob trying to improve on these grep / expressions

2019-01-03 Thread Christopher Stone
On 01/01/2019, at 13:47, Dj mailto:futurevint...@gmail.com>> wrote: > From what I see with your results, I think this is getting me to the place of > "good enough" for this problem. Hey Dj, Very good. > So the embarrasing part, I've tried to take your text and make a shell script > to place

Re: Noob trying to improve on these grep / expressions

2019-01-01 Thread Dj
From what I see with your results, I think this is getting me to the place of "good enough" for this problem. Also, really helping me understanding programming concepts better which is good because I have an idea I want to attempt to program (long road I see). So the embarrasing part, I've

Re: Noob trying to improve on these grep / expressions

2018-12-31 Thread Mike Pasini
Yes, Perl is installed on OS X and you can extend its functionality with modules like the one I mentioned. But you do have to write code to create a BBEdit Text Filter (although not much more than what the module's example shows). You can find the Apple Text Filter option under the Text menu

Re: Noob trying to improve on these grep / expressions

2018-12-31 Thread Christopher Stone
On 12/31/2018, at 13:54, Dj mailto:futurevint...@gmail.com>> wrote: > Mike, that makes a lot more sense now. I looked at page for the Module and it > seems it's run from terminal and OSX has perl pre-installed? Hey Dj, BBEdit can run shell scripts as Text-Filters, and they do not need to be

Re: Noob trying to improve on these grep / expressions

2018-12-31 Thread Christopher Stone
On 12/31/2018, at 13:49, Dj mailto:futurevint...@gmail.com>> wrote: > can I ask where you ran that expression in BBedit? Just menu ---> search > > find. Hey Dj, Beginning around v11.0 BBEdit has had an “Extract” button in the Find dialog. Find: \b\w[^.!]+?\? Replace: Nothing Using

Re: Noob trying to improve on these grep / expressions

2018-12-31 Thread Dj
Mike, that makes a lot more sense now. I looked at page for the Module and it seems it's run from terminal and OSX has perl pre-installed? Or is it a "module" than can be run somehow from within BBedit? Thanks for the patience, I'm not really a programmer, just want to look at questions posed

Re: Noob trying to improve on these grep / expressions

2018-12-31 Thread Dj
Hi, can I ask where you ran that expression in BBedit? Just menu ---> search > find. Find menu: Find: ([^\.]+?\?) Replace: \1\n Grep checked and then click replace all? It looks like the output is getting me closer to what I want, but running it on a huge block of text I'm still

Re: Noob trying to improve on these grep / expressions

2018-12-31 Thread Mike Pasini
Dj, Process Lines processes *lines* not sentences. So any paragraph that has a sentence with a question mark in it would match searches for strings with question marks. Identifying a sentence is not a simple task. But there's a Perl module to

Re: Noob trying to improve on these grep / expressions

2018-12-31 Thread ThePorgie
I ran this expression on your text: ([^\.]+?\?) with the replace: \1\n extracted to: —Eskimo proverb What can be added to the happiness of man who is in health, out of debt, and has a clear conscience? —Adam Smith Do you prefer that you be right, or that you be happy? What am I doing

Re: Noob trying to improve on these grep / expressions

2018-12-30 Thread Christopher Stone
On 12/29/2018, at 11:53, Dj mailto:futurevint...@gmail.com>> wrote: > Hello, I'm trying to extract every sentence that ends with a question from > some text files. I'm using the old text wrangler -> process lines -> copy to > new document, but I'm still getting a lot of sentences that don't

Noob trying to improve on these grep / expressions

2018-12-29 Thread Dj
Hello, I'm trying to extract every sentence that ends with a question from some text files. I'm using the old text wrangler -> process lines -> copy to new document, but I'm still getting a lot of sentences that don't end in question marks in that new text. I've come up with these two