Re: Converting decimal value of some numbers using Grep

2022-03-17 Thread Patrick Woolsey
On 3/17/22 at 7:58 AM, neil.goo...@faiman.org (Neil Faiman) wrote: On Mar 16, 2022, at 5:24 PM, Patrick Woolsey wrote: In *Find: ^(\d+?)\.1 *what is the purpose of the question mark? [...] It makes matching "non-greedy", so the pattern won't try to extend beyond the first possible match.

Re: Converting decimal value of some numbers using Grep

2022-03-17 Thread Neil Faiman
> On Mar 16, 2022, at 5:24 PM, Patrick Woolsey 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. In this particular case, the

Re: Converting decimal value of some numbers using Grep

2022-03-17 Thread jj
Howard, If it applies to you case you could use a literal find/replace. Uncheck the Grep checkbox in the Find/Replace window. Find: .1 Replace: .33 Find: .2 Replace: .67 Just my .2 cents. Best Regards, Jean On Thursday, March 17, 2022 at 12:21:53 AM UTC+1 Howard

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

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

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:

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

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`