Text Processing
Dreamweaver Find and Replace (w/ Regular Expressions)
Finding and replacing text is pretty straightforward. For example, you can find all text matching “car” and replace them with “cars”. Other types of find and replace are not so obvious. Here are some examples.
- Replace “x” with “x followed by a tab”
This is useful when you want the text to be tab delimited so you can copy and paste it all into Excel so that each column (separated by a tab) will appear in its own column for further processing.
FIND: x
REPLACE: xt
REGEX: checked - Replace new lines with “x newline”
This is useful if you need to edit text that appears at the end of a line.
FIND: n
REPLACE: xn
REGEX: checked - Wrap multiple values (one on each line) with single quotes (‘x’)
This is useful when you’re building a long drop down list of options in the format
<option value=’a’>a</option>
<option value=’b’>b</option>
<option value=’c’>c</option>
…
FIND: n
REPLACE: ‘n’
REGEX: checked