Page is a not externally linkable
doubleJ - 2:27 pm on Sep 27, 2011 (gmt 0)
Sorry, we don't appear to have many Regex gurus here in our RSS forum. Did you have any luck with this?
Kind of...
I went to the regex irc channel and they were able to shed some light.
I wasn't able to use the program "replacetext". It does do regex, but it wasn't working with the code that they were giving me.
I don't even remember which program that I ended up using (I tried a bunch of text editors).
I do recall that I had to open all the files up, within the program, I couldn't just select the files and batch it. Once all the files were open, I was able to batch within the open files.
This is what I ended up doing...
Find:
<enclosure url="(.*?)" length="23992870" type="audio/mpeg" />
Replace with:
<enclosure url="\1" length="23992870" type="audio/mpeg" />\r\n\t\t\t<guid>\1</guid>
Duplicates the line and adds a second line with the contents of (.*?)
Find:
([a-zA-Z]{3})(\s*)(\d+)
Replace with:
\3\2\1
Converts <pubDate>Sun, Aug 07, 2011 11:00:00 CST</pubDate> to <pubDate>Sun, 07 Aug, 2011 11:00:00 CST</pubDate>
Find:
<url>(.*?)</url>
Replace with: (nothing)
Deletes <url>whatever</url>
I will say that there was one problem with the used code.
"Marriage Enrichment 2010" ended up being something like "Marriage En2010richment ".
It has something to do with the whitespaces and then numbers. Any letters followed by none or more spaces (or something like that) followed by 1 or more numbers (or something like that) was changed.
I was doing it for the pubDate but it applied to the whole document. I had to go through and manually change the errors as I found them.
Especially when the subject header leads you to expect a question about adjusting the number of \n line breaks, which you can do standing on your head :(
I don't remember typing the word "break" or the code "\n" in the subject, anywhere.
JJ