Kim,

On Wed, 14 Feb 2024 14:44:27 -0800 (PST), Kim Mosley wrote:
> I want to add tabs (or something else that might be better) so that
> I can have three columns… date, vendor with city, and price.

> 01/03/23 CENTRAL MARKET 61 AUSTIN, TX 45.00
> 01/04/23 H-E-B 425 AUSTIN, TX 74.62
> 01/09/23 CENTRAL MARKET 61 AUSTIN, TX 43.70
> 01/10/23 WHOLEFDS LMR 10145 AUSTIN, TX 62.25
> 01/13/23 SQ *ASAHI IMPORTS Austin, TX 24.46
> 01/14/23 CENTRAL MARKET 61 AUSTIN, TX 29.22
> 01/17/23 CENTRAL MARKET 61 AUSTIN, TX 28.25
> 01/18/23 CENTRAL MARKET 61 AUSTIN, TX 19.34
> 01/21/23 CENTRAL MARKET 61 AUSTIN, TX 1.83
> 01/21/23 CENTRAL MARKET 61 AUSTIN, TX 18.34
> 01/23/23 CENTRAL MARKET 61 AUSTIN, TX 19.85

Search for
^([0-9]{2}/[0-9]{2}/[0-9]{2})\s{1,}(.*[A-Z]{2,})\s{1,}([0-9]{1,}\.[0-9]{2})

Replace with
\1\t\2\t\3

The *search for* regex makes several assumptions.

1. all entries in the data set begin on a new line.

2. all the dates in the data set are of the form mm/dd/yy (ie the
   legacy US-centric Gregorian date shorthand).

3. all the vendor addresses end with a comma, one or more spaces, and
   then a two-letter state code as per the USPS’s Publication 59,
   1963-10.

4. all prices are listed to two significant figures after the decimal
   point.

Hope this helps.

Regards,

Brian Forte

-- 
Brian Forte
<bfo...@adelaide.on.net>

-- 
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/20240215095722462538.d5f23e1a%40adelaide.on.net.

Reply via email to