Answer the question
In order to leave comments, you need to log in
How to add non-breaking spaces in Dreamweaver using regular expressions?
Please tell me how to set Dreamweaver to automatically place non-breaking spaces after all prepositions, conjunctions, number signs and dashes.
List: without, without, near, in, in, instead of, outside, for, before, behind, from, from, because of, from under, to, to, except for, between, between, on, over, necessary, o, about, both, from, oto, before, before, po, under, under, with, about, for the sake of, with, with, through, among, at, through, through, and, a, yes, but, or, what, so that, when, as if, as if, however, but, if, therefore, therefore, also, as well as, No., -
I found instructions for indesign, where the expression is indicated: (?<= )((to|to|without|to|from|to|to|to|to|o|from|before|with|through|with|y|not| for|above|for|about|under|about|and|a|but|yes|or|whether|it|what|like|I|he|we|they|neither)( |\. |, )) + (pasted it into the Find field, checked the Use regular expression checkbox, left the Replace field empty - I don't know what is indicated there), but Dreamweaver throws a regular expression syntax error.
The sample contained the following expressions (maybe I'm filling in the Replace field incorrectly in all cases): Non-
breaking space after prepositions
(?<= )((to|in|without|to|from|to|to|to|to|o|from |before|with|through|from|y|not|for|above|for|about|under|about|and|a|but|yes|or|whether|that|what|like|I|he|we |they|neither)( |\. |, ))+ Non-
breaking space after prepositions at the beginning of a sentence
((?<= )|(?<=^))((In|In|Without|To|From|To|To|To|To|O|From|Before|At|Through|S|U|No| For|Above|For|About|Under|Pro|I|A|But|Yes|Or|Whether|Would|That|What|How|I|He|We|They|Neither) )+ Non-
breaking space before the dash
(? <=) (~=)
Non-breaking space in digits
(?<=\d)(.)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question