I just want to add a dash!
October 13, 2009 1:33 PM
Subscribe
I'm using the find and replace tool in dreamweaver, ultilizing Regular Expressions to find four numbers and a space and then 'replace' that expression with itself but add a dash.
I have a series of years and descriptions, it looks something like this:
1991 Event Number 1
1992 Event Number 2
1994 Event Number 3
1997 Event Number 4
I want to turn that into:
1991
- Event Number 1
1992
- Event Number 2
1994
- Event Number 3
1997
- Event Number 4
I don't want to do it manually, because there's something like 200 some-odd dates. I've managed to deceiver a regular expression to find the year and space ([0-9][0-9][0-9][0-9] ) but I can't seem to get dreamweaver to replace the found expression with itself.
Is that possible? if not, is there any method I can use to find the 5th character in a line, or the first space in a line?
Any suggestions?
(fyi: the end document will be a html page.)
posted by royalsong to computers & internet (7 comments total)
2 users marked this as a favorite
Also, you can simplify ([0-9][0-9][0-9][0-9]) into (\d{4}) if Dreamweaver supports Perl-compatible regular expressions.
posted by letourneau at 1:41 PM on October 13