Re: A Question Derived from Converting decimal value

2022-03-16 Thread ThePorgie
Thank you sir! Don't know how I missed that in the manual and I promise I 
did look there first.

On Wednesday, March 16, 2022 at 4:13:30 PM UTC-4 Patrick Woolsey wrote:

> On 3/16/22 at 2:06 PM, thep...@gmail.com (ThePorgie) wrote:
>
> >I was tinkering with with Patrick's question
>
> Not actually my question ;-) though close enough for the matters 
> at hand.
>
>
> >So I was looking at this and knew it would have to be several 
> >passes, but my pattern I was working with for the first pass 
> >was "(?P\d+\.)1"
> >
> >My question is since I can't use a replace pattern \1 follow by 33
>
> You can in fact do this by prefixing a zero "0" to the singular 
> backreference number, so:
>
> Replace: \0133
>
> will give you the first backreference \01 followed by the string "33".
>
>
> >I was using a named pattern, but (?P=foo) doesn't call the named pattern
> >in the replace area of a grep search? Just curious as I couldn't find
> >anything regarding this in the manual.
>
> Please see the section titled "Subpatterns Make Replacement 
> Powerful" in Chapter 8 (page 202) of the current manual:
>
> Pattern Inserts
> =
> [...]
>
> \P the text matched by the subpattern NAME
>
>
> Regards,
>
> Patrick Woolsey
> ==
> Bare Bones Software, Inc. 
>
>

-- 
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/daa9a0b4-0151-4404-a775-ba345a104655n%40googlegroups.com.


Re: Converting decimal value of some numbers using Grep

2022-03-16 Thread Howard
Patrick,

Thanks for your help,

Howard

On Wednesday, 16 March 2022 at 5:24:21 pm UTC-4 Patrick Woolsey wrote:

> On 3/16/22 at 3:10 PM, leadwi...@gmail.com (Howard) wrote:
>
> >In *Find: ^(\d+?)\.1 *what is the purpose of the question mark? 
> >I know what *\d+* does.
> >
>
> It makes matching "non-greedy", so the pattern won't try to 
> extend beyond the first possible match.
>
>
> [For details, please see "Non-Greedy Quantifiers" in Chapter 8 
> (page 201) of the ubiquitous PDF manual. :-) ]
>
>
> Regards,
>
> Patrick Woolsey
> ==
> Bare Bones Software, Inc. 
>
>

-- 
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/7c632049-7bfa-42fe-8580-b2545b40b513n%40googlegroups.com.


Re: Converting decimal value of some numbers using Grep

2022-03-16 Thread Patrick Woolsey

On 3/16/22 at 3:10 PM, leadwithlo...@gmail.com (Howard) wrote:

In *Find: ^(\d+?)\.1 *what is the purpose of the question mark? 
I know what *\d+* does.




It makes matching "non-greedy", so the pattern won't try to 
extend beyond the first possible match.



[For details, please see "Non-Greedy Quantifiers" in Chapter 8 
(page 201) of the ubiquitous PDF manual. :-) ]



Regards,

  Patrick Woolsey
==
Bare Bones Software, Inc. 

--
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/r480Ps-10146i-C48F26778825470289940D07AE4E04A8%40Cylinder.local.


Re: A Question Derived from Converting decimal value

2022-03-16 Thread Patrick Woolsey

On 3/16/22 at 2:06 PM, thepo...@gmail.com (ThePorgie) wrote:


I was tinkering with with Patrick's question


Not actually my question ;-) though close enough for the matters 
at hand.



So I was looking at this and knew it would have to be several 
passes, but my pattern I was working with for the first pass 
was "(?P\d+\.)1"


My question is since I can't use a replace pattern \1 follow by 33


You can in fact do this by prefixing a zero "0" to the singular 
backreference number, so:


Replace:\0133

will give you the first backreference \01 followed by the string "33".



I was using a named pattern, but (?P=foo) doesn't call the named pattern
in the replace area of a grep search? Just curious as I couldn't find
anything regarding this in the manual.


Please see the section titled "Subpatterns Make Replacement 
Powerful" in Chapter 8 (page 202) of the current manual:


Pattern   Inserts
=
[...]

\P  the text matched by the subpattern NAME


Regards,

 Patrick Woolsey
==
Bare Bones Software, Inc. 

--
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/r480Ps-10146i-CC3F755291504BACA67A11A6CED360AC%40Cylinder.local.


Re: Converting decimal value of some numbers using Grep

2022-03-16 Thread Howard
Patrick,

In *Find: ^(\d+?)\.1 *what is the purpose of the question mark? I know what 
*\d+* does.

Howard

On Wednesday, 16 March 2022 at 1:41:06 pm UTC-4 Patrick Woolsey wrote:

> Though you can do this, you'll need to perform two search & replace 
> passes: one for each value pair.
>
> Find: ^(\d+?)\.1
>
> Replace: \1.33
>
> and 
>
> Find: ^(\d+?)\.2
>
> Replace: \1.67
>
>
> Regards,
>
> Patrick Woolsey
> ==
> Bare Bones Software, Inc. 
>
>
> > On Mar 16, 2022, at 13:02, Howard  wrote:
> > 
> > I have a column of numbers; some have a decimal value. Some numbers end 
> with `.1` and some end with `.2`. If a number's decimal part contains `.1` 
> I want to change its ending to `.33`, but keep its whole number the same, 
> so 1.1 would become 1.33. Also, if a number's decimal part contains `.2` I 
> want to change its ending to `.67`, but keep its whole number the same, so 
> 1.2 would become 1.67.
> > 
> > As the column can have hundreds of rows, using Grep is there an easy way 
> to convert the decimal portion of a number that ends with either .1 or .2 
> while retaining the whole number part?
> > 
> > Howard
> > 
> > Sample Desired output
> > 0.2 0.67
> > 1.1 1.33
> > 1.1 1.33
> > 1.2 1.67
> > 1.1 1.33
> > 6 6
> > 3.2 3.67
> > 8 8
> > 6.2 6.67
> > 
>
>

-- 
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/1daf1252-6a0c-47ed-b3e8-e0efe65c8077n%40googlegroups.com.


A Question Derived from Converting decimal value

2022-03-16 Thread ThePorgie
I was tinkering with with Patrick's question regarding replacing the digits 
where the "n.1" is replaced with "n.33" and "n.2" is replaced with "n.67"
His sample data:
*Sample  Desired output*
0.20.67
1.11.33
1.11.33
1.21.67
1.11.33
66
3.2 3.67
88
6.2 6.67

So I was looking at this and knew it would have to be several passes, but 
my pattern I was working with for the first pass was "(?P\d+\.)1"
My question is since I can't use a replace pattern \1 follow by 33 I was 
using a named pattern, but (?P=foo) doesn't call the named pattern in the 
replace area of a grep search? Just curious as I couldn't find anything 
regarding this in the manual.

-- 
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/37810128-a19b-480d-aceb-5f67fb812d6en%40googlegroups.com.


Re: Converting decimal value of some numbers using Grep

2022-03-16 Thread Patrick Woolsey
Though you can do this, you'll need to perform two search & replace passes: one 
for each value pair.

Find:  ^(\d+?)\.1

Replace:   \1.33

and 

Find:  ^(\d+?)\.2

Replace:   \1.67


Regards,

 Patrick Woolsey
==
Bare Bones Software, Inc. 


> On Mar 16, 2022, at 13:02, Howard  wrote:
> 
> I have a column of numbers; some have a decimal value. Some numbers end with 
> `.1` and some end with `.2`. If a number's decimal part contains `.1` I want 
> to change its ending to `.33`, but keep its whole number the same, so 1.1 
> would become 1.33. Also,  if a  number's decimal part contains `.2` I want to 
> change its ending to `.67`, but keep its whole number the same, so 1.2 would 
> become 1.67.
> 
> As the column can have hundreds of rows, using Grep is there an easy way to 
> convert the decimal portion of a number that ends with either .1 or .2 while 
> retaining the whole number part?
> 
> Howard
> 
> Sample  Desired output
> 0.20.67
> 1.11.33
> 1.11.33
> 1.21.67
> 1.11.33
> 66
> 3.2 3.67
> 88
> 6.2 6.67
> 

-- 
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/6E4EFDEA-DA2D-432C-827A-C8FC6B4ADF2C%40barebones.com.


Converting decimal value of some numbers using Grep

2022-03-16 Thread Howard
I have a column of numbers; some have a decimal value. Some numbers end 
with `.1` and some end with `.2`. If a number's decimal part contains `.1` 
I want to change its ending to `.33`, but keep its whole number the same, 
so 1.1 would become 1.33. Also,  if a  number's decimal part contains `.2` 
I want to change its ending to `.67`, but keep its whole number the same, 
so 1.2 would become 1.67.

As the column can have hundreds of rows, using Grep is there an easy way to 
convert the decimal portion of a number that ends with either .1 or .2 
while retaining the whole number part?

Howard

*Sample  Desired output*
0.20.67
1.11.33
1.11.33
1.21.67
1.11.33
66
3.2 3.67
88
6.2 6.67

-- 
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/9f91a68e-5559-48c4-b33f-2d9aca450b47n%40googlegroups.com.


[ANN] BBEdit 14.1.1

2022-03-16 Thread Rich Siegel
Good { morning, afternoon, evening },

We are pleased to announce the release and immediate availability of BBEdit 
14.1.1. This is a free and recommended update for anyone using BBEdit 14, and 
includes a number of fixes for reported issues, as well as all the new features 
and refinements previously released as part of the BBEdit 14.x upgrade cycle.

A complete digest of the changes is available here:

 

If you're already using BBEdit 14 (outside of the Mac App Store), you can 
choose "Check for Updates" from the BBEdit menu, or get the update from the 
BBEdit updates page:

 

Mac App Store customers of BBEdit will get the update automatically, and if you 
have an active subscription, all of the new advanced features are immediately 
available to you.

For those using an older version: if you would like to upgrade your paid BBEdit 
license, you are welcome to do so, starting here:

 .

If you purchased a BBEdit 13 license directly from us (or using our FastSpring 
web store) on or after January 1, 2021, you have been sent a free license 
upgrade, to the email address you used when purchasing. If you did not receive 
this, please check your spam traps.

Meanwhile, BBEdit offers a 30-day evaluation period. During that period, all of 
BBEdit’s features are available. When it ends, you can still use BBEdit — with 
no nag screens or unsolicited interruptions, for free, forever.

After the evaluation period, you may re-enable all of BBEdit’s exclusive 
features at any time by purchasing a license (at a discount, if you have a paid 
license for a previous version).

 

Enjoy,

R.

-- 
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/6FA98110-DFE0-4AB6-BBBD-343FFC317597%40barebones.com.