I use Dreamweaver to update copyright dates on my site. I want to keep existing intervals (or lack thereof) between years. Examples: & Copy; 2002-2008 should be updated and copied; 2002-2009 & Copy; 2003 - 2008 It should be updated and copied; 2003 - 2009 This is a regular expression that I use to do this in the search and replace function of Dreamweaver Find: & Copy; \ S * (\ d {4} \ S * - \ S *) \ d {3} [^ 9]
Replace: & Copy; $ 1 2009
Here's the PROBLEM: This expression works, but has this extra space between hyphens and 2009. If I write the replace expression without a space, as & copy; $ 12009, then dreamweaver searches for the 12.009th replacement in the find expression and, not finding it, prints $ 12009.
source
share