Link to home
Start Free TrialLog in
Avatar of khristofe
khristofe

asked on

Using coldfusion regex to cut a too long word

Hi, I want to cut words of more than n characters in 2 parts like n=10: nnnnnnnnnn = nnnnn- nnnnn. or nnnn- nnnnnn.
I would like to use regex for that, thanks!
ASKER CERTIFIED SOLUTION
Avatar of duncancumming
duncancumming
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of khristofe
khristofe

ASKER

That is working, but i would like to modify all words in this text that have more than 10 characters separating charcters with an hyphen after char 5 for example...
And then output the final text with all those words with hyphen after the character 5...

Text:
Loremipsum dolor sit amet, consectetur adipiscing elit. Crainsapien. Sed dapibussagittis quam. Vivamus est erat, elementumid, pulvinar id, aliquam et, metus. Proin vestibulum eros ac dui consequat porta.

Thanks!
The idea was to use regex to hyphenize long words into a div with justify text on it, CSS3 allows to do that using WORD-WRAP, but CSS2 don't... is it possible to use a script for that?