This breaks the items into groups of 3 — look for anything which isn’t a comma,
followed by a comma, repeat 3 times.
Find: ([^,]*,){3}
Replace: &\r
This drops everything after the first 3 items (needs a tweak to remove trailing
comma) — as above but also capture rest of line, and replace with first group.
Find: (([^,]*,){3}).+
Replace: \1
Cheers
> On 2021-04-27, at 05:53, Joel Braverman <[email protected]> wrote:
>
> have a few thousand of these:
> '199','627','1151','1249','1557','1558','1565','1689','1693','1711','1770','1780'
>
> I want to break them up into subgroups as our SQL system chokes at > 4000
> items in a query. How do I do that? I found a regex:
>
> [^,\\w][^\\,]*[^,]
>
> which seems to find all items, but now I need to extract the first 4000.
>
> - Joel
--
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/3A1154AB-FD0C-4226-83CB-FD7C53EBD740%40gmail.com.