Zhaba Zhournal
Thursday, August 19, 2004 
Small caps, small (very small) wonders 
This is how dorky I am: I'm removing the small caps formatting from the abbreviations "A.D." and "B.C." in the book I'm working on, and after a couple of quick global find-and-replace searches I wanted to see if I'd missed any, so I did a regular expression for the opening <small> tag followed by any of the letters, and I thought it was really cool that it was <small>[ABCD]—hey, look, the start of the alphabet! (And then I thought "I am such a dork.")

Actually (regular-expression geek alert), it's moderately useful, because I can trim a character from the regex now: [A-D] instead of [ABCD]. Although at the speed level I'm working at, eliminating those eight bits isn't going to make a huge efficiency difference.

Ooohhhh, I just thought of something even better: if I also have to search for the more-secular abbreviations of "B.C.E." and "C.E.," I can use [ABCDE] or even [A-E]. (Other regular-expression geeks will be pointing out that I'm not including the period in that class expression. Theoretically the period wouldn't be directly after the small-caps tag; but to be complete, <small>[A-E.].)

I'm way too excited about that. It's high time I left the office for the day...

[ at 5:57 PM • by Abby • permalink  ]

Yes, that's me.


JanFebhome (i.e. right now)

about zhaba
what the heck is "zhaba"?
amazon wish list

feed me
  Subscribe with Bloglines

who's got the button?
sign my guestmap  
join us
Get Firefox   Get Thunderbird
days till the next U.S. presidential election

>=recently updated
>Blogroll Me!<



even more buttons
Feedback by backBlog

© 2003–05 Zhaba Productions, so don't steal anything.