Splitting strings using Regular Expressions
Posted: 2024-09-27 16:40:32
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.
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.