Recent posts by RunningBlind

Subscribe to Recent posts by RunningBlind 3 posts found

Feb 24, 2008
RunningBlind 3 posts

Topic: Ideas and script requests / Hide links based on content date

Instead of getting today's date and converting it to that format, wouldn't it just be easier to look if the expiration date says "expired" instead of "expires"?

i.e. Hide all paragraphs that have "expired "in that little parenthetical expression.

 
Feb 19, 2008
RunningBlind 3 posts

Topic: Script development / Replace Function & Regular Expressions

Thanks, guys. I used znerp's expression and it worked in most cases, but I messed with a bit and realized he had made a small mistake.

The part for the time -- \d:\d+ -- should be replaced with \d+:\d+, so times with the hour greater than one digit match as well.

Other than that, it's perfect. Thanks.

 
Feb 18, 2008
RunningBlind 3 posts

Topic: Script development / Replace Function & Regular Expressions

I'm pretty terrible at regular expressions, and I was wondering if someone could help.

I want to replace something like "December 21, 2006 2:39 PM" with "Dec 21, 2006" to match any date and month in that format, of course.

sString.replace(/\s+\d+:\d+\s+[A-Z]+/, '')

That is what I currently have to replace everything after the year...whitespace, digit(s), colon, digit(s), whitespace, capital alphabet characters (like AM or PM).

That part is good.

Now I just want to get some replace function to replace full month names with their three-letter abbreviations.