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
Tom Robinson
unread,
Apr 26, 2021, 5:59:55 PM4/26/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to BBEdit Talk
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
Christopher Stone
unread,
Apr 27, 2021, 7:20:29 AM4/27/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message