E' possibile spezzare una stringa "troppo lunga" contenente vari periodi usando una espressione regolare?
Io uso "SIGIL" per gli epub e l'espressione regolare è:
- cambia '(.{399})([^ ]+)(\.\s)(.)'
- in '\1\2.</p>\n\n<p>\4'
per spezzare stringhe lunghe più di 399 caratteri al punto successivo.
Sarebbe possibile la stessa cosa in uno script AMC?
grazie.
Is it possible to break a "too long" string containing several periods using a regular expression?
I use "SIGIL" for epubs and the regular expression is:
- change '(.{399})([^ ]+)(\.\s)(.)'
- in ''\1\2.</p>\n\n<p>\4'
to break strings longer than 399 characters to the next period.
Would the same thing be possible in an AMC script?
Thank you.
Splitting strings using Regular Expressions
-
- Posts: 745
- Joined: 2007-04-28 05:46:43
- Location: Italy
Re: Splitting strings using Regular Expressions
There are regular expressions functions in AMC scripts, so I guess these should work.
That was added by Mickaël so I do not know by head how it works, if you check the list of functions in the help file and search for regular expressions, you'll find the list. I hope that the documentation will help you enough
That was added by Mickaël so I do not know by head how it works, if you check the list of functions in the help file and search for regular expressions, you'll find the list. I hope that the documentation will help you enough