Jump to content
You must now use your email address to sign in [click for more info] ×

find and replace space with nonbreaking space


Recommended Posts

I am from Slovakia and slovak language need at the end of column not to have single letter or two letter word. It must be before whole word in next line. 

Can you help me with sentence to find and replace all spaces with nonbreaking spaces for all single letter od two letter words?

example:

Ako sa
máš.

Zajtra a
pozajtra.

replace to:

Ako
sa<NBSP>máš.

Zajtra a
a<NBSP>pozajtra.

Thank you.

Link to comment
Share on other sites

I think that topic might be of interest to you, your solution might be close to @loukash last post (1/20/2023)…

MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82)
+ 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + 

Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026)
MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345)

Licence Universelle Affinity V2 updated to 2.3.0

Link to comment
Share on other sites

7 minutes ago, laurent32 said:

your solution might be close to @loukash last post (1/20/2023)…

Not even that… :) 
We've been explicitly through Czech (and thus also Slovak, even Polish) prepositions/conjunctions before:

And before that:

… and maybe some more.

MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2

Link to comment
Share on other sites

6 minutes ago, bajqo said:

what about two-character prepositions?

No jo, co s nimi…? 

You may need to create an explicit regex pattern to include those prepositions. I'm not skilled enough in regex to type a pattern off the top of my head. You will have to look up the syntax yourself or wait for someone else to chime in.

MacBookAir 15": MacOS Ventura > Affinity v1, v2, v2 beta // MacBookPro 15" mid-2012: MacOS El Capitan > Affinity v1 / MacOS Catalina > Affinity v1, v2, v2 beta // iPad 8th: iPadOS 16 > Affinity v2

Link to comment
Share on other sites

22 minutes ago, loukash said:

No jo, co s nimi…? 

You may need to create an explicit regex pattern to include those prepositions. I'm not skilled enough in regex to type a pattern off the top of my head. You will have to look up the syntax yourself or wait for someone else to chime in.

No tiež niesom skúsený dosť aby som to napísal sám. Len či náhodou to už niekto nevyriešil.

In my case just wait. I'm not skilled at all in regex to type pattern.

But thak you. Partial solution is still better than no solution.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.