Hi Russell,
I’m not sure what you exactly want to do, but if you just want to put the
negative lines into a second column in the CSV (comma separated values) file
and you have just one column in the origin file, you can use the following
pattern:
Search pattern: "^(\-{1})([0-9]{1,20}\.{0,1}[0-9]{0,2})“
Replacement pattern: ",\1\2“
(without quotation marks)
(If you want to have tabs instead of commas to separate the columns use "\t“
instead of “,“)
All the negative values will be placed now in a second column, but always in a
separate line.
The output will look like this:
,-2559.82
1168.41
,-12
,-7.21
23
Hope it helps.
Ulrich
> Am 20.05.2021 um 11:47 schrieb Russell B <[email protected]>:
>
>
> My bank accounts have a save to CSV option in a single Amount column, such as
> the following:
>
> -2559.82
> 1168.41
> -12
> -7.21
> 23
>
> I want to divide this into separate Credit & Debit columns, tab separated,
> such as
>
> Credit | Debit
>
> 1168.41 | 2559.82
>
> I can't create a robust GREP pattern to handle the existence or not of the
> decimal values. Can someone provide a suitable pattern?
> Thanks
>
> --
> This is the BBEdit Talk public discussion group. If you have a feature
> request or need technical support, please email "[email protected]"
> rather than posting here. Follow @bbedit on Twitter:
> <https://twitter.com/bbedit <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 [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/bbedit/783875e5-c1a0-438c-8071-678d598b71a1n%40googlegroups.com
>
> <https://groups.google.com/d/msgid/bbedit/783875e5-c1a0-438c-8071-678d598b71a1n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
This is the BBEdit Talk public discussion group. If you have a feature request
or need technical support, please email "[email protected]" 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/83E4CF01-DF2D-4986-AC8C-179817EC820E%40gmx.de.