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. <https://www.barebones.com/>
>
>
> > On Mar 16, 2022, at 13:02, Howard <leadwi...@gmail.com> 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: <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/1daf1252-6a0c-47ed-b3e8-e0efe65c8077n%40googlegroups.com.

Reply via email to