Re: Removing text from parenthesis on

2020-06-01 Thread 'anotherhoward' via BBEdit Talk
That is quite an easy way to do it. Thanks.

On Monday, June 1, 2020 at 10:46:41 AM UTC-4, TJ Luoma wrote:
>
>
> On Mon, Jun 1, 2020 at 10:32 AM 'anotherhoward' via BBEdit Talk <
> bbe...@googlegroups.com > wrote:
>
>> What if I wanted to extract all the text up to, but not including, the 
>> left parenthesis?
>>
>
> search for 
>
> \(.*
>
> and replace it with nothing.
>
> You may want to add a space before it if you want to exclude the space
>
>
>
>  
>
>>
>> On Monday, June 1, 2020 at 9:49:58 AM UTC-4, Jean-Christophe Helary wrote:
>>>
>>>
>>>
>>> > On Jun 1, 2020, at 21:31, Howard  wrote: 
>>> > 
>>> > Here is an input sample: 
>>> > 
>>> > Arizona (5) 
>>> > Minnesota (4) 
>>> > Cleveland (2) 
>>> > San Diego (4) 
>>> > 
>>> > Using Grep, I want to remove all the text in each item from the left 
>>> parenthesis on. How can I do that? 
>>>
>>> including the left parenthesis: 
>>> search for \(.+$ 
>>> replace with nothing 
>>>
>>> excluding the left parenthesis: 
>>> search for (?<=\().+$ 
>>> replace with nothing 
>>>
>>> The "exclusion" uses a "lookbehind" match as in "look behind this to see 
>>> if the rest matches, but only act on the rest". So here, it says "look 
>>> behind a left parenthesis see if you find anything" 
>>>
>>>
>>> -- 
>>> Jean-Christophe Helary @brandelune 
>>> http://mac4translators.blogspot.com 
>>>
>>> -- 
>> This is the BBEdit Talk public discussion group. If you have a feature 
>> request or need technical support, please email "sup...@barebones.com 
>> " rather than posting here. Follow @bbedit on Twitter: <
>> https://twitter.com/bbedit>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "BBEdit Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to bbe...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/bbedit/bbca3dfb-ac5e-4c35-b0d5-9c693153bfe8%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/26ccdad6-24dc-4875-a793-f56d10d3f5b1%40googlegroups.com.


Re: Removing text from parenthesis on

2020-06-01 Thread 'anotherhoward' via BBEdit Talk
Thank you very much.

On Monday, June 1, 2020 at 10:45:44 AM UTC-4, Jean-Christophe Helary wrote:
>
>
>
> > On Jun 1, 2020, at 23:32, 'anotherhoward' via BBEdit Talk <
> bbe...@googlegroups.com > wrote: 
> > 
> > What if I wanted to extract all the text up to, but not including, the 
> left parenthesis? 
>
> Then you need to check that the left parenthesis is ahead of the stuff you 
> need to match. So it's a "lookahead is there's a left parens!": 
>
> ^.+(?=\() 
>
> And if you want to *extract* the stuff that matches, you have a cute 
> "Extract" button in the Search dialog to do that. 
>
> The manual is of tremendous help too. 
>
> -- 
> Jean-Christophe Helary @brandelune 
> http://mac4translators.blogspot.com 
>
>
> > 
> > On Monday, June 1, 2020 at 9:49:58 AM UTC-4, Jean-Christophe Helary 
> wrote: 
> > 
> > 
> >> On Jun 1, 2020, at 21:31, Howard  wrote: 
> >> 
> >> Here is an input sample: 
> >> 
> >> Arizona (5) 
> >> Minnesota (4) 
> >> Cleveland (2) 
> >> San Diego (4) 
> >> 
> >> Using Grep, I want to remove all the text in each item from the left 
> parenthesis on. How can I do that? 
> > 
> > including the left parenthesis: 
> > search for \(.+$ 
> > replace with nothing 
> > 
> > excluding the left parenthesis: 
> > search for (?<=\().+$ 
> > replace with nothing 
> > 
> > The "exclusion" uses a "lookbehind" match as in "look behind this to see 
> if the rest matches, but only act on the rest". So here, it says "look 
> behind a left parenthesis see if you find anything" 
> > 
> > 
> > -- 
> > Jean-Christophe Helary @brandelune 
> > http://mac4translators.blogspot.com 
> > 
> > 
> > -- 
> > This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "sup...@barebones.com 
> " rather than posting here. Follow @bbedit on Twitter: <
> https://twitter.com/bbedit> 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups "BBEdit Talk" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to bbe...@googlegroups.com . 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/bbca3dfb-ac5e-4c35-b0d5-9c693153bfe8%40googlegroups.com.
>  
>
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/2dfa0654-8621-4b23-93b8-cf37e66f6c5c%40googlegroups.com.


Re: Removing text from parenthesis on

2020-06-01 Thread TJ Luoma
On Mon, Jun 1, 2020 at 10:32 AM 'anotherhoward' via BBEdit Talk <
bbedit@googlegroups.com> wrote:

> What if I wanted to extract all the text up to, but not including, the
> left parenthesis?
>

search for

\(.*

and replace it with nothing.

You may want to add a space before it if you want to exclude the space





>
> On Monday, June 1, 2020 at 9:49:58 AM UTC-4, Jean-Christophe Helary wrote:
>>
>>
>>
>> > On Jun 1, 2020, at 21:31, Howard  wrote:
>> >
>> > Here is an input sample:
>> >
>> > Arizona (5)
>> > Minnesota (4)
>> > Cleveland (2)
>> > San Diego (4)
>> >
>> > Using Grep, I want to remove all the text in each item from the left
>> parenthesis on. How can I do that?
>>
>> including the left parenthesis:
>> search for \(.+$
>> replace with nothing
>>
>> excluding the left parenthesis:
>> search for (?<=\().+$
>> replace with nothing
>>
>> The "exclusion" uses a "lookbehind" match as in "look behind this to see
>> if the rest matches, but only act on the rest". So here, it says "look
>> behind a left parenthesis see if you find anything"
>>
>>
>> --
>> Jean-Christophe Helary @brandelune
>> http://mac4translators.blogspot.com
>>
>> --
> This is the BBEdit Talk public discussion group. If you have a feature
> request or need technical support, please email "supp...@barebones.com"
> rather than posting here. Follow @bbedit on Twitter: <
> https://twitter.com/bbedit>
> ---
> You received this message because you are subscribed to the Google Groups
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to bbedit+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/bbedit/bbca3dfb-ac5e-4c35-b0d5-9c693153bfe8%40googlegroups.com
> 
> .
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/CADjGqHs5FPMgL%2BTtWm3pgck1_OXG5T60XpQkNqtjBeH3mU1D_A%40mail.gmail.com.


Re: Removing text from parenthesis on

2020-06-01 Thread Jean-Christophe Helary



> On Jun 1, 2020, at 23:32, 'anotherhoward' via BBEdit Talk 
>  wrote:
> 
> What if I wanted to extract all the text up to, but not including, the left 
> parenthesis?

Then you need to check that the left parenthesis is ahead of the stuff you need 
to match. So it's a "lookahead is there's a left parens!":

^.+(?=\()

And if you want to *extract* the stuff that matches, you have a cute "Extract" 
button in the Search dialog to do that.

The manual is of tremendous help too.

-- 
Jean-Christophe Helary @brandelune
http://mac4translators.blogspot.com


> 
> On Monday, June 1, 2020 at 9:49:58 AM UTC-4, Jean-Christophe Helary wrote:
> 
> 
>> On Jun 1, 2020, at 21:31, Howard  wrote: 
>> 
>> Here is an input sample: 
>> 
>> Arizona (5) 
>> Minnesota (4) 
>> Cleveland (2) 
>> San Diego (4) 
>> 
>> Using Grep, I want to remove all the text in each item from the left 
>> parenthesis on. How can I do that? 
> 
> including the left parenthesis: 
> search for \(.+$ 
> replace with nothing 
> 
> excluding the left parenthesis: 
> search for (?<=\().+$ 
> replace with nothing 
> 
> The "exclusion" uses a "lookbehind" match as in "look behind this to see if 
> the rest matches, but only act on the rest". So here, it says "look behind a 
> left parenthesis see if you find anything" 
> 
> 
> -- 
> Jean-Christophe Helary @brandelune 
> http://mac4translators.blogspot.com 
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a feature 
> request or need technical support, please email "supp...@barebones.com" 
> rather than posting here. Follow @bbedit on Twitter: 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to bbedit+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/bbca3dfb-ac5e-4c35-b0d5-9c693153bfe8%40googlegroups.com.

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/65195EA7-FCF9-4B21-88A5-A9C5157A24C0%40traduction-libre.org.


Re: Removing text from parenthesis on

2020-06-01 Thread 'anotherhoward' via BBEdit Talk
What if I wanted to extract all the text up to, but not including, the left 
parenthesis?

On Monday, June 1, 2020 at 9:49:58 AM UTC-4, Jean-Christophe Helary wrote:
>
>
>
> > On Jun 1, 2020, at 21:31, Howard > 
> wrote: 
> > 
> > Here is an input sample: 
> > 
> > Arizona (5) 
> > Minnesota (4) 
> > Cleveland (2) 
> > San Diego (4) 
> > 
> > Using Grep, I want to remove all the text in each item from the left 
> parenthesis on. How can I do that? 
>
> including the left parenthesis: 
> search for \(.+$ 
> replace with nothing 
>
> excluding the left parenthesis: 
> search for (?<=\().+$ 
> replace with nothing 
>
> The "exclusion" uses a "lookbehind" match as in "look behind this to see 
> if the rest matches, but only act on the rest". So here, it says "look 
> behind a left parenthesis see if you find anything" 
>
>
> -- 
> Jean-Christophe Helary @brandelune 
> http://mac4translators.blogspot.com 
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/bbca3dfb-ac5e-4c35-b0d5-9c693153bfe8%40googlegroups.com.


Re: Removing text from parenthesis on

2020-06-01 Thread Jean-Christophe Helary



> On Jun 1, 2020, at 21:31, Howard  wrote:
> 
> Here is an input sample:
> 
> Arizona (5)
> Minnesota (4)
> Cleveland (2)
> San Diego (4)
> 
> Using Grep, I want to remove all the text in each item from the left 
> parenthesis on. How can I do that?

including the left parenthesis:
search for \(.+$
replace with nothing

excluding the left parenthesis:
search for (?<=\().+$
replace with nothing

The "exclusion" uses a "lookbehind" match as in "look behind this to see if the 
rest matches, but only act on the rest". So here, it says "look behind a left 
parenthesis see if you find anything"


-- 
Jean-Christophe Helary @brandelune
http://mac4translators.blogspot.com

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/92D88C75-60BE-4A29-A761-56A9F779D7E2%40traduction-libre.org.


Removing text from parenthesis on

2020-06-01 Thread Howard
*Here is an input sample:*

Arizona (5)
Minnesota (4)
Cleveland (2)
San Diego (4)

Using Grep, I want to remove all the text in each item from the left 
parenthesis on. How can I do that?

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: 
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/0e66137c-58ce-4f66-8c09-5e3a6ac9e18b%40googlegroups.com.