Try this:
===
FIND:
(?:^2 PLAC(?: \d+) \K(\w+)(\h\w+)(\h\w+)(?=\h\w+$))|(?:^2 PLAC(?: \d+)
\K(\w+)(\h\w+)(\h\w+)(\h\w+)(?=\h\w+$))
CHANGE TO: \1,\2,\3,\4
===
That should ignore the first number and handle groups of either 3 or 4
words afterwards. It could be further modified if longer groups are
possible.
It doesn't handle street names in the most intelligent way, as it will
put a comma after the street name. And if any words had punctuation in
them (like "St.", or a hyphen), that would require further modification.
Rick Gordon
----------
On June 7, 2023 at 1:18:08 PM [-0700], Dave Simpson wrote in an email
entitled "Re: Replacing all spaces in a line, but not the first":
> 2 PLAC 129 Haymarket, London, England /[Ideal
> answer because space between '129' and 'Haymarket'
> is skipped, but not essential]/
>
> 2 PLAC 24 Long Street Chester Cheshire
> 2 PLAC 24, Long, Street, Chester, Cheshire
>
> 2 PLAC Meadows, Lowestoft, England
> 2 PLAC Meadows Lowestoft England
>
> Thanks
> On Tuesday, June 6, 2023 at 2:48:07 PM UTC+1 Kaveh
> Bazargan wrote:
>
> Hi Dave
>
> Could you give several examples of before,
> then the same ones after?
>
> Regards
> Kaveh
>
> On Tue, 6 Jun 2023 at 14:45, Dave Simpson
> <
quar...@gmail.com> wrote:
>
> Hi, I'm a novice at this sort of thing.
>
> I have a line of text:-
> /2 PLAC 11 Haymarket Willenhall Staffordshire/
>
> I want to replace the spaces with ,
> [comma space] after the first part of the
> line [2 PLAC ]
>
> ^(2 PLAC ) finds me the start
> Now I want to replace the spaces with
> comma space:-
>
> /2 PLAC 11, Haymarket, Willenhall,
> Staffordshire/
> [It would be brilliant if it were possible
> to skip the first space between 11 and
> Haymarket]
> /
> /
> <
https://groups.google.com/d/msgid/bbedit/8ef6eae3-ca41-4f50-bf72-c4394a8fee8fn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
>
>
> --
> Kaveh Bazargan PhD
> Director
> River Valley Technologies
> <
http://rivervalley.io> ● Twitter
> <
https://twitter.com/rivervalley1000> ●
> LinkedIn
> <
https://www.linkedin.com/in/bazargankaveh/>●
> ORCID <
https://orcid.org/0000-0002-1414-9098>
> ● @kave...@mastodon.social
> <
https://mastodon.social/@kaveh1000>
> *Accelerating the Communication of Research*
> *<
https://www.linkedin.com/posts/bazargankaveh_ismte-innovation-award-recipient-kaveh-bazargan-activity-7039348552526921728-XAEB/?utm_source=share&utm_medium=member_desktop>
>
https://rivervalley.io/gigabyte-wins-the-alpsp-scholarly-publishing-innovation-award-using-river-valleys-publishing-technology/
> <
https://rivervalley.io/gigabyte-wins-the-alpsp-scholarly-publishing-innovation-award-using-river-valleys-publishing-technology/>
> *
>
> --
> This is the BBEdit Talk public discussion group.
> If you have a feature request or need technical
> support, please email "
sup...@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+un...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/bbedit/34efcbe2-6182-4ce7-a737-900da7c534can%40googlegroups.com
> <
https://groups.google.com/d/msgid/bbedit/34efcbe2-6182-4ce7-a737-900da7c534can%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
>
>
> --
> Kaveh Bazargan PhD
> Director
> River Valley Technologies <
http://rivervalley.io> ●
> Twitter <
https://twitter.com/rivervalley1000> ●
> LinkedIn <
https://www.linkedin.com/in/bazargankaveh/>●
> ORCID <
https://orcid.org/0000-0002-1414-9098> ●
> @kave...@mastodon.social
> <
https://mastodon.social/@kaveh1000>
> *Accelerating the Communication of Research*
> *<
https://www.linkedin.com/posts/bazargankaveh_ismte-innovation-award-recipient-kaveh-bazargan-activity-7039348552526921728-XAEB/?utm_source=share&utm_medium=member_desktop>
>
https://rivervalley.io/gigabyte-wins-the-alpsp-scholarly-publishing-innovation-award-using-river-valleys-publishing-technology/
> <
https://rivervalley.io/gigabyte-wins-the-alpsp-scholarly-publishing-innovation-award-using-river-valleys-publishing-technology/>
> *
>
>
>
> --
> Kaveh Bazargan PhD
> Director
> River Valley Technologies <
http://rivervalley.io> ●
> Twitter <
https://twitter.com/rivervalley1000> ● LinkedIn
> <
https://www.linkedin.com/in/bazargankaveh/>● ORCID
> <
https://orcid.org/0000-0002-1414-9098> ●
> @kave...@mastodon.social <
https://mastodon.social/@kaveh1000>
> *Accelerating the Communication of Research*
> *<
https://www.linkedin.com/posts/bazargankaveh_ismte-innovation-award-recipient-kaveh-bazargan-activity-7039348552526921728-XAEB/?utm_source=share&utm_medium=member_desktop>
>
https://rivervalley.io/gigabyte-wins-the-alpsp-scholarly-publishing-innovation-award-using-river-valleys-publishing-technology/
> <
https://rivervalley.io/gigabyte-wins-the-alpsp-scholarly-publishing-innovation-award-using-river-valleys-publishing-technology/>
> *
>
> --
> This is the BBEdit Talk public discussion group. If you have a
> feature request or need technical support, please email
> "
sup...@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+un...@googlegroups.com.
>
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/bbedit/293f45d2-3ed3-44d0-891f-fc32d61df2f3n%40googlegroups.com
> <
https://groups.google.com/d/msgid/bbedit/293f45d2-3ed3-44d0-891f-fc32d61df2f3n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
>
>
> --
> Kaveh Bazargan PhD
> Director
> River Valley Technologies <
http://rivervalley.io> ● Twitter
> <
https://twitter.com/rivervalley1000> ● LinkedIn
> <
https://www.linkedin.com/in/bazargankaveh/>● ORCID
> <
https://orcid.org/0000-0002-1414-9098> ● @kave...@mastodon.social
> <
https://mastodon.social/@kaveh1000>
> *Accelerating the Communication of Research*
> *<
https://www.linkedin.com/posts/bazargankaveh_ismte-innovation-award-recipient-kaveh-bazargan-activity-7039348552526921728-XAEB/?utm_source=share&utm_medium=member_desktop>
>
https://rivervalley.io/gigabyte-wins-the-alpsp-scholarly-publishing-innovation-award-using-river-valleys-publishing-technology/
> <
https://rivervalley.io/gigabyte-wins-the-alpsp-scholarly-publishing-innovation-award-using-river-valleys-publishing-technology/>
> *
>
> --
> This is the BBEdit Talk public discussion group. If you have a feature
> request or need technical support, please email
> "
sup...@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+un...@googlegroups.com
> <mailto:
bbedit+un...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/bbedit/8df13542-9166-43a7-998e-8bdc7090cea1n%40googlegroups.com
> <
https://groups.google.com/d/msgid/bbedit/8df13542-9166-43a7-998e-8bdc7090cea1n%40googlegroups.com?utm_medium=email&utm_source=footer>.
___________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________
WWW:
http://www.shelterpub.com