How to filter / sort CSV-files by certain columns?

247 views
Skip to first unread message

Vlad Ghitulescu

unread,
Mar 25, 2025, 2:03:35 PMMar 25
to bbe...@googlegroups.com
Hey,


I use BBEdit very often while working with big CSV-files (300 - 500 MB, up to 4 million rows) looking like this:

MANDT;BU;IDENTIFIER;OBJNR;ADRC_ADDRNUMBER;ADRC_COUNTRY;ADRC_REGION;ADRC_POST_CODE1;ADRC_CITY1;ADRC_CITY_EXT;ADRC_CITY2;ADRC_STREET;ADRC_HOUSE_NUM1;ADRC_HOUSE_NUM2;LOKAREF_COUNTRY;LOKAREF_REGION;LOKAREF_POST_CODE1;LOKAREF_CITY1;LOKAREF_CITY_CODE;LOKAREF_CITY_EXT;LOKAREF_CITY2;LOKAREF_CITYP_CODE;LOKAREF_STREET;LOKAREF_STRT_CODE;LOKAREF_HOUSE_NUM1;LOKAREF_HOUSE_NUM2;COUNTRY_KZ;REGION_KZ;POST_CODE1_KZ;CITY1_KZ;CITY_EXT_KZ;CITY2_KZ;STREET_KZ;ADR_CHK_KZ;MSGNO;MESSAGE
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723592;DE;09;86415;Mering;;Sankt Afra;Egerländer Straße;;;DE;09;86415;Mering;500000002795;, Schwab;Sankt Afra;00000006;Egerländerstraße;910011919800;;;0;0;0;0;1;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723657;DE;09;85655;Aying;;Kaps;Kaps;;;DE;09;85653;Aying;500000002262;;Kaps;00000010;Kaps;700055566100;;;0;0;1;0;3;0;0;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723658;DE;09;83083;Riedering;;Patting;Patting;;;DE;09;83083;Riedering;500000002552;b Rosenheim, Oberbay;Patting;00000037;Pattinger Straße;910003809300;;;0;0;0;0;1;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723674;DE;09;85655;Aying;;Großhelfendorf;Hirschbergstraße;;;DE;09;85653;Aying;500000002262;;Großhelfendorf;00000007;Hirschbergstraße;910002873200;;;0;0;1;0;3;0;0;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723878;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723908;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723918;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723956;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007724554;DE;09;95131;Schwarzenbach a.Wald;;Schwarzenbach a Wald;Walter-Münch-Straße;;;DE;09;95131;Schwarzenbach a.Wald;500000011836;;Schwarzenbach a.Wald;00000001;Walter-Münch-Straße;910007835500;;;0;0;0;0;3;1;0;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007724593;DE;09;95131;Schwarzenbach a.Wald;;Schwarzenbach a Wald;Walter-Münch-Straße;;;DE;09;95131;Schwarzenbach a.Wald;500000011836;;Schwarzenbach a.Wald;00000001;Walter-Münch-Straße;910007835500;;;0;0;0;0;3;1;0;1;;

Once in a while I’d like to filter or sort such huge files by one or more columns, like:

1. Filter all lines that have ADR_CHK_KZ = 1 or
2. Sort the file by MSGNO, ADRC_COUNTRY, ADRC_REGION, ADRC_POST_CODE1, ADRC_CITY1, ADRC_CITY2, ADRC_STREET and ADRC_HOUSE_NUM1.

Is there a way to do this sort of tasks with BBEdit?

Thanks!


Regards,
Vlad



GP

unread,
Mar 25, 2025, 3:53:47 PMMar 25
to BBEdit Talk
For filtering, look at Text -> Process Lines Containing ... and for sorting Text -> Sort Lines ... using grep patterns to identify what you want to match for filtering and what subpattern field or fields you want to sort ordered on.

If the number of fields in your sample is representative of the real CSV files you're working with, it is going to be something of a pain in the rear coming up with the grep patterns needed to accomplish the desired filtering and sorting.

GP

unread,
Mar 25, 2025, 5:32:00 PMMar 25
to BBEdit Talk
As a follow up...

BBEdit's Pattern Playground is a great help in constructing tedious grep patterns like you'll need for your filtering and sorting needs. The really tedious part is getting the field position(s) you want to filter or sort on so you can modify that field's match pattern to conform to the desired filter or sorting criteria.

For example... For your " Filter all lines that have ADR_CHK_KZ = 1" using Text -> Process Lines Containing ... with the grep pattern:


\d{3};\w{3};[^;]*;[^;]*;\d{10};\w{2};\d{2};\d{5};[^;]*;[^;]*;[^;]*;[^;]*;[^;]*;[^;]*;\w{2};\d{2};\d{5};[^;]*;\d{12};[^;]*;[^;]*;\d{8};[^;]*;\d{12};[^;]*;[^;]*;\d;\d;\d;\d;\d;\d;\d;(1);[^;]*;[^\n]*


will do the trick. For filtering you don't need the group capturing on the 1 but it is useful with Pattern Playground to verify you're getting the right field position and field contents matched.


For your "Sort the file by MSGNO, ADRC_COUNTRY, ADRC_REGION, ADRC_POST_CODE1, ADRC_CITY1, ADRC_CITY2, ADRC_STREET and ADRC_HOUSE_NUM1" using Text -> Sort Lines ... with a grep pattern of:


\d{3};\w{3};[^;]*;[^;]*;\d{10};(\w{2});(\d{2});(\d{5});([^;]*);[^;]*;([^;]*);([^;]*);([^;]*);[^;]*;\w{2};\d{2};\d{5};[^;]*;\d{12};[^;]*;[^;]*;\d{8};[^;]*;\d{12};[^;]*;[^;]*;\d;\d;\d;\d;\d;\d;\d;\d;([^;]*);[^\n]*

with "Specific sub-patterns" selected with \8\1\2\3\4\5\6\7 in the fill in field will sort your example text using your desired field ordering.

Bruce Van Allen

unread,
Mar 25, 2025, 6:49:44 PMMar 25
to BBEdit Talk
Hey Vlad,

A BBEdit feature that might help is its ability to detect and manipulate
*columns*. You’ll find it under the Edit menu. As far as I can tell, the
columns it detects are tab or comma separated. A look at your sample
showed no quote marks, but it did have a few commas; if you replace the
semi-colon (‘;’) separators with tabs, then BBEdit will recognize your
columns. How could that help? Well, one idea would be to move the
column(s) you care about for search or sorting to the left-most
position, greatly simplifying any pattern matching you want to try.

Always work on a copy of your file, of course.

HTH

------ Original Message ------
From "GP" <gp-bbed...@hotmail.com>
To "BBEdit Talk" <bbe...@googlegroups.com>
Date 3/25/2025 2:32:00 PM
Subject Re: How to filter / sort CSV-files by certain columns?
>--
>This is the BBEdit Talk public discussion group. If you have a feature
>request or believe that the application isn't working correctly, please
>email "sup...@barebones.com" rather than posting here. Follow @bbedit
>on Mastodon: <https://mastodon.social/@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+un...@googlegroups.com.
>To view this discussion visit
>https://groups.google.com/d/msgid/bbedit/50130484-14eb-4298-b762-800f88b2c66en%40googlegroups.com
><https://groups.google.com/d/msgid/bbedit/50130484-14eb-4298-b762-800f88b2c66en%40googlegroups.com?utm_medium=email&utm_source=footer>.


Thanks,

- Bruce

_bruce__van_allen__santa_cruz__ca_


Vlad Ghitulescu

unread,
Mar 26, 2025, 9:24:37 AMMar 26
to bbe...@googlegroups.com
Hey Bruce,


Thanks for the idea!

I changed the semicolon into tab

CleanShot 2025-03-26 at 08.11.14.png
CleanShot 2025-03-26 at 08.11.50.png

Vlad Ghitulescu

unread,
Mar 26, 2025, 9:24:57 AMMar 26
to bbe...@googlegroups.com
Hey GP


And thanks for the suggestion!

I tried the sort-solution before trying to understand the regex itself 😶

I pasted into Text —> Sort Lines… like this

CleanShot 2025-03-26 at 08.24.24.png

but after Sort it doesn’t look like the postal code column was considered

CleanShot 2025-03-26 at 08.25.19.png

Did I miss something?

Thanks again!


Regards,
Vlad





--
This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@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+un...@googlegroups.com.

Vlad Ghitulescu

unread,
Mar 26, 2025, 9:25:11 AMMar 26
to bbe...@googlegroups.com
Hello again,


I changed all the semicolons to ",", changed then the grep ^ and $ into " and then voilá! the columns magically appeared:

CleanShot 2025-03-26 at 08.57.09.png
CleanShot 2025-03-26 at 09.01.19.png
CleanShot 2025-03-26 at 09.03.44.png

Vlad Ghitulescu

unread,
Mar 26, 2025, 9:25:17 AMMar 26
to bbe...@googlegroups.com
The rearrange columns worked only on the first 25,816 lines

CleanShot 2025-03-26 at 09.21.19.png

Vlad Ghitulescu

unread,
Mar 26, 2025, 9:51:17 AMMar 26
to bbe...@googlegroups.com
The „disaster" was most probably caused by errors in the CSV-file: There is a " in the line just after the tragedy happens and 3 CRLF in the middle of some rows 😣



Am 26.03.2025 um 09:29 schrieb Vlad Ghitulescu <Vl...@Ghitulescu.de>:

The rearrange columns worked only on the first 25,816 lines 

-- 
This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@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+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bbedit/D78F9924-03B3-4117-9B3D-BC6614B5D1D5%40Ghitulescu.de.
<CleanShot 2025-03-26 at 09.21.19.png>

The rest of the file was more or less mixed (see above). I’ll talk with the support about it.





Am 26.03.2025 um 09:08 schrieb Vlad Ghitulescu <Vl...@Ghitulescu.de>:

Hello again,


I changed all the semicolons to ",", changed then the grep ^ and $ into " and then voilá! the columns magically appeared:

<CleanShot 2025-03-26 at 08.57.09.png>

After this I could successfully rearrange the columns 

<CleanShot 2025-03-26 at 09.01.19.png>

I then sorted all but the first line… and this totally destroyed the file

<CleanShot 2025-03-26 at 09.03.44.png>

(The copy of the file, that is - naturally! 😉)

I’ll start analyzing the new problem…


Regards,
Vlad






<CleanShot 2025-03-26 at 08.11.14.png>

but unfortunately that didn’t unlock the possibility to rearrange the columns 

<CleanShot 2025-03-26 at 08.11.50.png>

Any idea where I went wrong?

Thanks again!


Regards,
Vlad





-- 
This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@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+un...@googlegroups.com.

Bruce Van Allen

unread,
Mar 26, 2025, 10:14:05 AMMar 26
to bbe...@googlegroups.com
Properly formatted .csv files may have CR, LF, and CRLF end of line
constructs in records. However, this would be where the best approach
would be to use tools designed for the .csv protocol, rather than
BBEdit’s manifold text editor tools.

In Perl, we use the Text::CSV family of modules. You can specify the
column separator as the semi-colon in your files, and read in the
records as simple arrays, with null or blank values handled. There’s
also the database route if you wanted to go a bit further with your Perl
- DBI plus DBD::CSV.

Other modern languages have similar capabilities.

You could probably also open that file in Excel, if you want the GUI
path. Sometimes I do that just to take a look at a file’s structure. But
beware that Excel will convert some data such as dates to its own
format, and make other “helpful” changes like dropping leading zeroes -
a problem with postal codes, e.g. - unless you first designate all cells
in the sheet as “text”.

HTH

------ Original Message ------
From "Vlad Ghitulescu" <Vl...@Ghitulescu.de>
To bbe...@googlegroups.com
Date 3/26/2025 6:47:17 AM
Thanks,

- Bruce

_bruce__van_allen__santa_cruz__ca_


Vlad Ghitulescu

unread,
Mar 26, 2025, 10:34:40 AMMar 26
to bbe...@googlegroups.com
You’re probably right re BBEdit vs other special tools - even Rich suggested this in the beginning of our conversation.

The question is: Which other tool exactly?

Excel would not import 3 million+ records 😔 and yes, I encountered the „helpful“ changes and some more too 😶

The Perl-CSV family of modules sounds like heaven 😉 - unfortunately I didn’t learn Perl yet 😶


Marshall Clow

unread,
Mar 26, 2025, 10:42:06 AMMar 26
to bbe...@googlegroups.com
On Mar 26, 2025, at 7:25 AM, Vlad Ghitulescu <Vl...@Ghitulescu.de> wrote:

You’re probably right re BBEdit vs other special tools - even Rich suggested this in the beginning of our conversation.

The question is: Which other tool exactly?

Excel would not import 3 million+ records 😔 and yes, I encountered the „helpful“ changes and some more too 😶

The Perl-CSV family of modules sounds like heaven 😉 - unfortunately I didn’t learn Perl yet 😶

I have done stuff with the ’csv’ module in python 3, but nothing this extensive.

— Marshall


Bruce Van Allen

unread,
Mar 26, 2025, 11:04:35 AMMar 26
to bbe...@googlegroups.com
Another way staying in BBEdit would be to do some neutralizing
conversions before parsing into columns.

For example, when I need to embed newlines in a file of text records
whose records are separated by newlines, I replace the internal newlines
with another character that isn’t already in the records somewhere -
such as a backslash (‘\’). It looks like your records all start with
‘200' and end with two consecutive semi-colons (‘;;’). If so, then you
could search for newlines NOT surrounded by those.

When I do this I take a step and then save a copy of the file before
moving to the next cleanup step. Always want to be able to back up a
step or two if I goof.

[Sorry about the stupid smart quotes my new email client insists on
converting from straight quotes.]

HTH

------ Original Message ------
From "Marshall Clow" <mtc...@gmail.com>
To bbe...@googlegroups.com
Date 3/26/2025 7:41:47 AM
Subject Re: How to filter / sort CSV-files by certain columns?

Thanks,

- Bruce

_bruce__van_allen__santa_cruz__ca_


jj

unread,
Mar 26, 2025, 1:08:14 PMMar 26
to BBEdit Talk
Vlad,

You could use some command line utility like xsv  (https://github.com/BurntSushi/xsv)

Install it with homebrew in the terminal:

    $ brew install xsv
   
and then:
    
    $ xsv sort --select="MSGNO,ADRC_COUNTRY,ADRC_REGION,ADRC_POST_CODE1,ADRC_CITY1,ADRC_CITY2,ADRC_STREET,ADRC_HOUSE_NUM1" --delimiter=";" --output="/path/to/some-sorted.csv" "/path/to/some.csv"

HTH,

Jean Jourdain

GP

unread,
Mar 26, 2025, 2:42:29 PMMar 26
to BBEdit Talk
First, in your Sort Lines dialog screenshot, you need to select the "Specific sub-patterns:" option instead of "Entire match" in order for the lines to be sorted by your column sorting criteria (MSGNO, ADRC_COUNTRY, ADRC_REGION, ADRC_POST_CODE1, ADRC_CITY1, ADRC_CITY2, ADRC_STREET and ADRC_HOUSE_NUM1). Since the sort lines grep pattern:


\d{3};\w{3};[^;]*;[^;]*;\d{10};(\w{2});(\d{2});(\d{5});([^;]*);[^;]*;([^;]*);([^;]*);([^;]*);[^;]*;\w{2};\d{2};\d{5};[^;]*;\d{12};[^;]*;[^;]*;\d{8};[^;]*;\d{12};[^;]*;[^;]*;\d;\d;\d;\d;\d;\d;\d;\d;([^;]*);[^\n]*

will match every line in your example, using the "Entire match" option devolves the sort into a simple whole line string sort which would put the MSGNO (i.e. \8 in the example) column contents last instead of first in the sort order. (See the "Sort Lines" section in Chapter 5 of the BBEdit User Manual for details of using sub-pattern sort ordering.)

With the "Entire match" option, if you look at every 2..> line the left part of each line is the same until you get to the part of the string with the ADRC_ADDRNUMBER characters so the differences in that part of the string is Sort Line's "Entire match" is using to determine the ordering of the whole line strings.

Using the "Specific sub-patterns:" option is what allows you to specify what substring part(s) of a string/line and what composed ordering of those concatenated substring will be used in determining the sort ordering between whole strings/lines.

To see what's going on with Sort Lines' "Specific sub-patterns:" option you can use BBEdit's Pattern Playground to see what the concatenated substring for a line is being used to determine line sort ordering. For "Search pattern:" put:


\d{3};\w{3};[^;]*;[^;]*;\d{10};(\w{2});(\d{2});(\d{5});([^;]*);[^;]*;([^;]*);([^;]*);([^;]*);[^;]*;\w{2};\d{2};\d{5};[^;]*;\d{12};[^;]*;[^;]*;\d{8};[^;]*;\d{12};[^;]*;[^;]*;\d;\d;\d;\d;\d;\d;\d;\d;([^;]*);[^\n]*

and for "Replace pattern" put:


\8\1\2\3\4\5\6\7

and for "Contents of" chose an open example file.

As you step through each grep pattern match (using the Next button), the "Replacement text:" field will show you the concatenated string composed from the capture group ordered substring of the whole matched string/line. It is that "Replacement text:" string that Sort Lines uses for "Specific sub-patterns:" option sorting evaluation.

P.S. If an explanation of what the parts of a grep regular expression is specifying would help,  https://regex101.com has a pretty good explanation panel that explains what each bit of a regular expression is doing. 

Vlad Ghitulescu

unread,
Mar 28, 2025, 10:12:01 AMMar 28
to bbe...@googlegroups.com
Hey Jean Jourdain!


I’ve installed xsv and let it work with my 57MB CSV-file… and it prompt found the same error where BBEdit had also problems:


Vlad@MAC-V14157-QL909QJ73J ~ % xsv sort --select="MSGNO,ADRC_COUNTRY,ADRC_REGION,ADRC_POST_CODE1,ADRC_CITY1,ADRC_CITY2,ADRC_STREET,ADRC_HOUSE_NUM1" --delimiter=";" --output="/Users/Vlad/Desktop/2025-03-24 BAG - PEO - manuell - sorted.csv" "/Users/Vlad/Desktop/2025-03-24 BAG - PEO - manuell.csv"
CSV error: record 25816 (line: 25816, byte: 6673969): found record with 12 fields, but the previous record has 36 fields
Vlad@MAC-V14157-QL909QJ73J ~ %


It looks like I should better take care of the CSV-file BEFORE bothering the whole world about my CSV-problems… 😉

Nevertheless xsv looks nice and - after massaging my CSV-file! - I’ll give it a chance. I have A LOT of CSV-files I work with.

Thanks again!


Regards,
Vlad




-- 
This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@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+un...@googlegroups.com.

Vlad Ghitulescu

unread,
Mar 28, 2025, 10:12:01 AMMar 28
to bbe...@googlegroups.com
Thanks, Marshall, I’ll take a look - it could be THE reason to finally do something with Python again 😉


-- 
This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@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+un...@googlegroups.com.

Vlad Ghitulescu

unread,
Mar 28, 2025, 10:12:01 AMMar 28
to bbe...@googlegroups.com
I thought about this before but couldn’t solve it.

You’re right, the records all start (in this file) with 200 BUT not all recs end with two consecutive semi-colons (the ERROR-MESSAGE is the last and I have recs with ERROR-MESSAGEs <> ‚‘).



-- 
This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@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+un...@googlegroups.com.

Vlad Ghitulescu

unread,
Mar 28, 2025, 10:12:03 AMMar 28
to bbe...@googlegroups.com
Hey GP


I corrected the error re „Specific sub-patterns:“ but this didn’t seem to bring any change: The ADRC_POST_CODE1 is still not sorted

CleanShot 2025-03-28 at 10.02.07.png

The command gave also no recognizable sign that is ready, so I’m not sure that it didn’t have also problems with the line 25816, where the CRLF follows a house-number (see previous emails).

BBEdit’s Pattern Playground shows however that there is no result after searching with the regex

CleanShot 2025-03-28 at 10.09.51.png

I’ll take the regex to regex101 (thanks for the hint!) and see if I could spot an error.



Regards,
Vlad




GP

unread,
Mar 28, 2025, 2:16:34 PMMar 28
to BBEdit Talk
Your Pattern Playground results are perplexing. Using your first post's example CSV data, the grep:


\d{3};\w{3};[^;]*;[^;]*;\d{10};(\w{2});(\d{2});(\d{5});([^;]*);[^;]*;([^;]*);([^;]*);([^;]*);[^;]*;\w{2};\d{2};\d{5};[^;]*;\d{12};[^;]*;[^;]*;\d{8};[^;]*;\d{12};[^;]*;[^;]*;\d;\d;\d;\d;\d;\d;\d;\d;([^;]*);[^\n]*

results in every line but the first column labels line matching.

To figure out what the problem might be on your system with your local language configuration using either BBEdit's Pattern Playground or regex101 start out by building the grep pattern from scratch and rebuilding it from left to right by semicolon delineated field pattern parts. E.g., first \d{3}; which should find/highlight 7 matches in each line of the example CSV data - second add \w{3}; for a total grep of \d{3};\w{3}; which should result in the leading 200;BAG; being highlighted for each line in the example. Continue on like that until you find the next added semicolon delineated field pattern part fails to show a match for the left side part of each line in the example data. It'll be something in that line's or lines' field/column that isn't matching what the just add grep pattern part's matching criteria is.

In addition to sorting, an additional use of a working grep pattern is that you can also use it with BBEdit's Text -> Process Lines Containing... to find all lines that do NOT contain that grep pattern which will help in finding malformed CSV data in the large CSV data files your working with. 

jj

unread,
Mar 28, 2025, 3:02:57 PMMar 28
to BBEdit Talk
Vlad,

xsv has a fixlengths command that might help:

xsv fixlengths --help

Transforms CSV data so that all records have the same length. The length is

the length of the longest record in the data (not counting trailing empty fields,

but at least 1). Records with smaller lengths are padded with empty fields.


This requires two complete scans of the CSV data: one for determining the

record size and one for the actual transform. Because of this, the input

given must be a file and not stdin.


Alternatively, if --length is set, then all records are forced to that length.

This requires a single pass and can be done with stdin.


Usage:

    xsv fixlengths [options] [<input>]


fixlengths options:

    -l, --length <arg>     Forcefully set the length of each record. If a

                           record is not the size given, then it is truncated

                           or expanded as appropriate.


Common options:

    -h, --help             Display this message

    -o, --output <file>    Write output to <file> instead of stdout.

    -d, --delimiter <arg>  The field delimiter for reading CSV data.

                           Must be a single character. (default: ,)


HTH,

Jean Jourdain

Vlad Ghitulescu

unread,
Mar 31, 2025, 10:18:48 PMMar 31
to bbe...@googlegroups.com
Oh, that’s great, GP - with this I’ll understand better how this (for me) huge regex works! Thanks for the tip!
I’ll try this and report back.


Am 28.03.2025 um 19:16 schrieb GP <gp-bbed...@hotmail.com>:

Your Pattern Playground results are perplexing. Using your first post's example CSV data, the grep:

\d{3};\w{3};[^;]*;[^;]*;\d{10};(\w{2});(\d{2});(\d{5});([^;]*);[^;]*;([^;]*);([^;]*);([^;]*);[^;]*;\w{2};\d{2};\d{5};[^;]*;\d{12};[^;]*;[^;]*;\d{8};[^;]*;\d{12};[^;]*;[^;]*;\d;\d;\d;\d;\d;\d;\d;\d;([^;]*);[^\n]*

results in every line but the first column labels line matching.

To figure out what the problem might be on your system with your local language configuration using either BBEdit's Pattern Playground or regex101 start out by building the grep pattern from scratch and rebuilding it from left to right by semicolon delineated field pattern parts. E.g., first \d{3}; which should find/highlight 7 matches in each line of the example CSV data - second add \w{3}; for a total grep of \d{3};\w{3}; which should result in the leading 200;BAG; being highlighted for each line in the example. Continue on like that until you find the next added semicolon delineated field pattern part fails to show a match for the left side part of each line in the example data. It'll be something in that line's or lines' field/column that isn't matching what the just add grep pattern part's matching criteria is.

In addition to sorting, an additional use of a working grep pattern is that you can also use it with BBEdit's Text -> Process Lines Containing... to find all lines that do NOT contain that grep pattern which will help in finding malformed CSV data in the large CSV data files your working with. 
On Friday, March 28, 2025 at 7:12:03 AM UTC-7 Vlad Ghitulescu wrote:
Hey GP


I corrected the error re „Specific sub-patterns:“ but this didn’t seem to bring any change: The ADRC_POST_CODE1 is still not sorted

<CleanShot 2025-03-28 at 10.02.07.png>

The command gave also no recognizable sign that is ready, so I’m not sure that it didn’t have also problems with the line 25816, where the CRLF follows a house-number (see previous emails).

BBEdit’s Pattern Playground shows however that there is no result after searching with the regex

To view this discussion visit https://groups.google.com/d/msgid/bbedit/a12981c7-c81f-44cb-9f7b-3ea64cd6c602n%40googlegroups.com.
<CleanShot 2025-03-28 at 10.02.07.png><CleanShot 2025-03-28 at 10.09.51.png>

Vlad Ghitulescu

unread,
Mar 31, 2025, 10:18:48 PMMar 31
to bbe...@googlegroups.com
Hey Jean Jourdain,


Thanks for the tip with fixlengths but - if I understand correctly what this command does - I wouldn’t try to set the lines to the same length because there are some address-fields there (like city, district and street) that have different lengths.


Regards,
Vlad




Vlad Ghitulescu

unread,
Apr 7, 2025, 7:09:32 AMApr 7
to bbe...@googlegroups.com
Hi GP,


First of all: I modified a bit the order of the lines in my sample to this


MANDT;BU;IDENTIFIER;OBJNR;ADRC_ADDRNUMBER;ADRC_COUNTRY;ADRC_REGION;ADRC_POST_CODE1;ADRC_CITY1;ADRC_CITY_EXT;ADRC_CITY2;ADRC_STREET;ADRC_HOUSE_NUM1;ADRC_HOUSE_NUM2;LOKAREF_COUNTRY;LOKAREF_REGION;LOKAREF_POST_CODE1;LOKAREF_CITY1;LOKAREF_CITY_CODE;LOKAREF_CITY_EXT;LOKAREF_CITY2;LOKAREF_CITYP_CODE;LOKAREF_STREET;LOKAREF_STRT_CODE;LOKAREF_HOUSE_NUM1;LOKAREF_HOUSE_NUM2;COUNTRY_KZ;REGION_KZ;POST_CODE1_KZ;CITY1_KZ;CITY_EXT_KZ;CITY2_KZ;STREET_KZ;ADR_CHK_KZ;MSGNO;MESSAGE
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723592;DE;09;86415;Mering;;Sankt Afra;Egerländer Straße;;;DE;09;86415;Mering;500000002795;, Schwab;Sankt Afra;00000006;Egerländerstraße;910011919800;;;0;0;0;0;1;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723918;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723657;DE;09;85655;Aying;;Kaps;Kaps;;;DE;09;85653;Aying;500000002262;;Kaps;00000010;Kaps;700055566100;;;0;0;1;0;3;0;0;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723878;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723658;DE;09;83083;Riedering;;Patting;Patting;;;DE;09;83083;Riedering;500000002552;b Rosenheim, Oberbay;Patting;00000037;Pattinger Straße;910003809300;;;0;0;0;0;1;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723674;DE;09;85655;Aying;;Großhelfendorf;Hirschbergstraße;;;DE;09;85653;Aying;500000002262;;Großhelfendorf;00000007;Hirschbergstraße;910002873200;;;0;0;1;0;3;0;0;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723908;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007724554;DE;09;95131;Schwarzenbach a.Wald;;Schwarzenbach a Wald;Walter-Münch-Straße;;;DE;09;95131;Schwarzenbach a.Wald;500000011836;;Schwarzenbach a.Wald;00000001;Walter-Münch-Straße;910007835500;;;0;0;0;0;3;1;0;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723956;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007724593;DE;09;95131;Schwarzenbach a.Wald;;Schwarzenbach a Wald;Walter-Münch-Straße;;;DE;09;95131;Schwarzenbach a.Wald;500000011836;;Schwarzenbach a.Wald;00000001;Walter-Münch-Straße;910007835500;;;0;0;0;0;3;1;0;1;;


in order to have the 10 records NOT already sorted.

I've built then the grep piece by piece in BBEdit’s Pattern Playground as you suggested

CleanShot 2025-04-07 at 06.14.52.png

and made only a minor change to the „Replace pattern" in order to still have the semicolons (see above).
The grep selects every single line of the sample data with the exception of the first - hurray! 
That means that sorting the changed file will sort the lines as I wanted. After this it would only be necessary to put the columns in the initial order.

Now that I know for sure 😉 that the grep works I wanted to get the „Sort lines…“ also working, so I put then your grep in the „Sort lines…“ again

CleanShot 2025-04-07 at 06.17.42.png

and checked also „Sorted lines to new document“.

As you see above the lines were still NOT sorted (see the column of the ADRC_POST_CODE1 marked in the screenshot above) after this… actually they not differ at all from the original, as comparing the two front windows shows:

CleanShot 2025-04-07 at 06.16.43.png

Did I still miss something?


Regards,
Vlad







Am 28.03.2025 um 19:16 schrieb GP <gp-bbed...@hotmail.com>:

Your Pattern Playground results are perplexing. Using your first post's example CSV data, the grep:

\d{3};\w{3};[^;]*;[^;]*;\d{10};(\w{2});(\d{2});(\d{5});([^;]*);[^;]*;([^;]*);([^;]*);([^;]*);[^;]*;\w{2};\d{2};\d{5};[^;]*;\d{12};[^;]*;[^;]*;\d{8};[^;]*;\d{12};[^;]*;[^;]*;\d;\d;\d;\d;\d;\d;\d;\d;([^;]*);[^\n]*

results in every line but the first column labels line matching.

To figure out what the problem might be on your system with your local language configuration using either BBEdit's Pattern Playground or regex101 start out by building the grep pattern from scratch and rebuilding it from left to right by semicolon delineated field pattern parts. E.g., first \d{3}; which should find/highlight 7 matches in each line of the example CSV data - second add \w{3}; for a total grep of \d{3};\w{3}; which should result in the leading 200;BAG; being highlighted for each line in the example. Continue on like that until you find the next added semicolon delineated field pattern part fails to show a match for the left side part of each line in the example data. It'll be something in that line's or lines' field/column that isn't matching what the just add grep pattern part's matching criteria is.

In addition to sorting, an additional use of a working grep pattern is that you can also use it with BBEdit's Text -> Process Lines Containing... to find all lines that do NOT contain that grep pattern which will help in finding malformed CSV data in the large CSV data files your working with. 
On Friday, March 28, 2025 at 7:12:03 AM UTC-7 Vlad Ghitulescu wrote:
Hey GP


I corrected the error re „Specific sub-patterns:“ but this didn’t seem to bring any change: The ADRC_POST_CODE1 is still not sorted

<CleanShot 2025-03-28 at 10.02.07.png>

The command gave also no recognizable sign that is ready, so I’m not sure that it didn’t have also problems with the line 25816, where the CRLF follows a house-number (see previous emails).

BBEdit’s Pattern Playground shows however that there is no result after searching with the regex

GP

unread,
Apr 7, 2025, 10:25:49 PMApr 7
to BBEdit Talk
Hmm... This is really puzzling. Sub-pattern line sorting works for me but for some unknown reason not for you.

Using your new sample data set:


MANDT;BU;IDENTIFIER;OBJNR;ADRC_ADDRNUMBER;ADRC_COUNTRY;ADRC_REGION;ADRC_POST_CODE1;ADRC_CITY1;ADRC_CITY_EXT;ADRC_CITY2;ADRC_STREET;ADRC_HOUSE_NUM1;ADRC_HOUSE_NUM2;LOKAREF_COUNTRY;LOKAREF_REGION;LOKAREF_POST_CODE1;LOKAREF_CITY1;LOKAREF_CITY_CODE;LOKAREF_CITY_EXT;LOKAREF_CITY2;LOKAREF_CITYP_CODE;LOKAREF_STREET;LOKAREF_STRT_CODE;LOKAREF_HOUSE_NUM1;LOKAREF_HOUSE_NUM2;COUNTRY_KZ;REGION_KZ;POST_CODE1_KZ;CITY1_KZ;CITY_EXT_KZ;CITY2_KZ;STREET_KZ;ADR_CHK_KZ;MSGNO;MESSAGE
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723592;DE;09;86415;Mering;;Sankt Afra;Egerländer Straße;;;DE;09;86415;Mering;500000002795;, Schwab;Sankt Afra;00000006;Egerländerstraße;910011919800;;;0;0;0;0;1;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723918;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723657;DE;09;85655;Aying;;Kaps;Kaps;;;DE;09;85653;Aying;500000002262;;Kaps;00000010;Kaps;700055566100;;;0;0;1;0;3;0;0;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723878;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723658;DE;09;83083;Riedering;;Patting;Patting;;;DE;09;83083;Riedering;500000002552;b Rosenheim, Oberbay;Patting;00000037;Pattinger Straße;910003809300;;;0;0;0;0;1;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723674;DE;09;85655;Aying;;Großhelfendorf;Hirschbergstraße;;;DE;09;85653;Aying;500000002262;;Großhelfendorf;00000007;Hirschbergstraße;910002873200;;;0;0;1;0;3;0;0;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723908;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007724554;DE;09;95131;Schwarzenbach a.Wald;;Schwarzenbach a Wald;Walter-Münch-Straße;;;DE;09;95131;Schwarzenbach a.Wald;500000011836;;Schwarzenbach a.Wald;00000001;Walter-Münch-Straße;910007835500;;;0;0;0;0;3;1;0;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723956;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007724593;DE;09;95131;Schwarzenbach a.Wald;;Schwarzenbach a Wald;Walter-Münch-Straße;;;DE;09;95131;Schwarzenbach a.Wald;500000011836;;Schwarzenbach a.Wald;00000001;Walter-Münch-Straße;910007835500;;;0;0;0;0;3;1;0;1;;

and for the Sort Lines ... "Sort using pattern"'s "Searching pattern:" of:


\d{3};\w{3};[^;]*;[^;]*;\d{10};(\w{2});(\d{2});(\d{5});([^;]*);[^;]*;([^;]*);([^;]*);([^;]*);[^;]*;\w{2};\d{2};\d{5};[^;]*;\d{12};[^;]*;[^;]*;\d{8};[^;]*;\d{12};[^;]*;[^;]*;\d;\d;\d;\d;\d;\d;\d;\d;([^;]*);[^\n]*

With "Specific sub-patterns:" of:


\8\1\2\3\4\5\6\7

and "Sorted lines to new document" result in a new document containing:


MANDT;BU;IDENTIFIER;OBJNR;ADRC_ADDRNUMBER;ADRC_COUNTRY;ADRC_REGION;ADRC_POST_CODE1;ADRC_CITY1;ADRC_CITY_EXT;ADRC_CITY2;ADRC_STREET;ADRC_HOUSE_NUM1;ADRC_HOUSE_NUM2;LOKAREF_COUNTRY;LOKAREF_REGION;LOKAREF_POST_CODE1;LOKAREF_CITY1;LOKAREF_CITY_CODE;LOKAREF_CITY_EXT;LOKAREF_CITY2;LOKAREF_CITYP_CODE;LOKAREF_STREET;LOKAREF_STRT_CODE;LOKAREF_HOUSE_NUM1;LOKAREF_HOUSE_NUM2;COUNTRY_KZ;REGION_KZ;POST_CODE1_KZ;CITY1_KZ;CITY_EXT_KZ;CITY2_KZ;STREET_KZ;ADR_CHK_KZ;MSGNO;MESSAGE
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723658;DE;09;83083;Riedering;;Patting;Patting;;;DE;09;83083;Riedering;500000002552;b Rosenheim, Oberbay;Patting;00000037;Pattinger Straße;910003809300;;;0;0;0;0;1;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723674;DE;09;85655;Aying;;Großhelfendorf;Hirschbergstraße;;;DE;09;85653;Aying;500000002262;;Großhelfendorf;00000007;Hirschbergstraße;910002873200;;;0;0;1;0;3;0;0;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723657;DE;09;85655;Aying;;Kaps;Kaps;;;DE;09;85653;Aying;500000002262;;Kaps;00000010;Kaps;700055566100;;;0;0;1;0;3;0;0;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723592;DE;09;86415;Mering;;Sankt Afra;Egerländer Straße;;;DE;09;86415;Mering;500000002795;, Schwab;Sankt Afra;00000006;Egerländerstraße;910011919800;;;0;0;0;0;1;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723918;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723878;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723908;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007723956;DE;09;93336;Altmannstein;;Berghausen;Altmannsteiner Str.;;;DE;09;93336;Altmannstein;500000005266;;Berghausen;00000003;Altmannsteiner Straße;910001339100;;;0;0;0;0;3;0;1;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007724554;DE;09;95131;Schwarzenbach a.Wald;;Schwarzenbach a Wald;Walter-Münch-Straße;;;DE;09;95131;Schwarzenbach a.Wald;500000011836;;Schwarzenbach a.Wald;00000001;Walter-Münch-Straße;910007835500;;;0;0;0;0;3;1;0;1;;
200;BAG;20250324080508_/ETN/PM_EAV_ADR_CHK_ADRC_V14157F;;0007724593;DE;09;95131;Schwarzenbach a.Wald;;Schwarzenbach a Wald;Walter-Münch-Straße;;;DE;09;95131;Schwarzenbach a.Wald;500000011836;;Schwarzenbach a.Wald;00000001;Walter-Münch-Straße;910007835500;;;0;0;0;0;3;1;0;1;;

So, given the sample data and the specific sub-patterns (record fields) we're sorting on, it ends up being the ADRC_POST_CODE1 field value which determines how the lines are sorted when I do it.

I also tried it with both "Sorted lines to new document" and "Sorted linees replace selection" options set as you have and I got my same above result. I also tried it with line endings set to "Windows (CRLF)" as you have it and got the same above result.

Here's a screenshot of the Find Differences result:
Compare_sort_lines.png
See on the "Sorted Lines" side it is next and tidy sorted in the ADRC_POST_CODE1 column/field.

Vlad Ghitulescu

unread,
Apr 9, 2025, 7:35:52 AMApr 9
to BBEdit Talk

Hey GP,

yes, this is strange.

I'll ask BBEdit-support about it, perhaps they could hint to some differences that I don't get.
I'll come back to this.

Thanks again!

Regards,
Vlad


and made only a minor change to the „*Replace pattern*" in order to still

have the semicolons (see above).
The grep selects every single line of the sample data with the exception
of the first - hurray!
That means that sorting the changed file will sort the lines as I wanted.
After this it would only be necessary to put the columns in the initial
order.

Now that I know for sure 😉 that the grep works I wanted to get the „*Sort
lines…*“ also working, so I put then your grep in the „*Sort lines…*“
again

[image: CleanShot 2025-04-07 at 06.17.42.png]

and checked also „*Sorted lines to new document*“.

--
This is the BBEdit Talk public discussion group. If you have a feature
request or believe that the application isn't working correctly, please
email "sup...@barebones.com" rather than posting here. Follow @bbedit on
Mastodon: <https://mastodon.social/@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+un...@googlegroups.com.

To view this discussion visit

--
This is the BBEdit Talk public discussion group. If you have a feature
request or believe that the application isn't working correctly, please
email "sup...@barebones.com" rather than posting here. Follow @bbedit on
Mastodon: <https://mastodon.social/@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+un...@googlegroups.com.

To view this discussion visit

<CleanShot 2025-03-28 at 10.02.07.png><CleanShot 2025-03-28 at
10.09.51.png>

--

This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@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+un...@googlegroups.com.

Vlad Ghitulescu

unread,
Apr 12, 2025, 3:04:20 PMApr 12
to BBEdit Talk

Hey all,

GP helped me with this "mystery": Unfortunately I did NOT include any regular expression capture groups in my first attempts to use the regex with Sort Lines….
As soon as I did it worked as expected 😆

So now I learned to solve my problem with BBEdit and xsv… and also learned some regex on the way.

Thanks you all for this!

Regards,
Vlad


On 9 Apr 2025, at 13:02, Vlad Ghitulescu wrote:

Hey GP,

yes, this is strange.

I'll ask BBEdit-support about it, perhaps they could hint to some differences that I don't get.
I'll come back to this.

Thanks again!

Regards,
Vlad

---

Reply all
Reply to author
Forward
0 new messages