|
I don't think you can use a variable in regex.
One thing I did notice, however, is that if you're trying to replace more than just one instance of something, you can split on something, then join on "".
s.split(something);
s.join("");
This will replace all instances of variable something with "". If you have two or more spaces in the resulting string, then use regex to replace all double-or-more instances of space with just single space.
__________________
^_^
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
|