I spent an hour or so this morning writing a regular expression to conditionally convert html character entities. Finding character entities is easy: &([A-Za-z]+;|#[0-9]+;), and ‘grep -v’ will give you the opposite. Of course, doing substitutions in Perl, there is no ‘-v’ option and so this becomes a bit more problematic. Here’s my solution:


# doesn't begin w/ alpha or #
# alpha, but no ;
# '#' but no ;
&([^a-z#]|[a-z]+(?=[^a-z;]+)|#d+(?=[^d;]+))/&$1/i

You need to use lookaheads to insure that there are no semicolons at the end of the string you’re looking for.

Of course, some time later a friend sends me an example that basically does the same thing.

Anyway, some good came out of this: I broke out the copy of Mastering Regular Expressions that I hadn’t touched in a while, and I have a few links that are of interest:

I’ve spent the rest of the day so far shooting around town. I need to acquire 7 stills from this video that ‘represent’ LA.

From this week’s LA Weekly: Out of Left Field:

That is to say, given an incumbent president with unlimited campaign dollars, and competing Democratic candidates with more resources and greater name recognition than yours, you need to alter the conventional formulas for money and organization and troops on the ground, and to do it without spending too much cash up front. The major change Dean hopes to make in the political environment is to enlarge the electorate, and to do so by drawing from the vast, untapped reservoir of eligible voters (50 percent by some estimates) who either have never participated in politics or who are discouraged dropouts from the system.

This in itself is a fairly profound connection to have perceived. no other Democratic candidate has advanced any ideas at all, really, on ways to counter the enormous imbalance of resources that otherwise threatens to dominate the general election . and the interesting thing, even so far in advance of the election, is the possibility that this approach might actually succeed. In late June, at a rally for him at UCLA following his appearance at an environmental forum there . a rally that has been put together in two days by Bruins for Dean and, even with a last-minute time change, has managed to produce a gathering of 600 . Dean asks how many people in the crowd are newcomers to political participation, and about half the group, by no means all of them students, raise their hands.

I have a Sony PD-150 in my hot little hands for the next day or so (until handing it off to my other group member. Apparently it’s a much loved videographer’s camera, although for film, maybe a little less ideal.

So, from these sources, and doing some rough math and guestimating:

  • 3×1/3″ CCDs, 35mm ratio (~6.66:1)
  • 6.0-72.0mm; f1.6-f2.4; 58mm filter, this converts to a !40.0-479.6mm 35mm FOV equivalent
  • aperatures smaller than f11 or so will have diffraction (not losing much because at 6mm, you’re going to get like 1ft-infinity hyperfocal anyway; those ND filters will really come in handy, best to aim for f5.6 or less (to test)
  • at 6mm, DOF is pretty hopeless, you’ll pretty much get 2/3ft to infinity, even completely wide, but at a tele (remember 6mm is already close to the standard 50mm equivalent for FOV) you can get some decent DOF. You’ll just need to shoot your actors from across the room…

Basically speaking, DOF is pathetic on all these video cameras.

More fun:

Perhaps I’m just dreaming, but to having a much larger imaging site and fully adjustable gamma (and real-time histograms) would be pretty darn useful.

Anonymous Spammer says:

As a professional sender of UCE, I just want to tell you slashdotters to keep on playing with your spam filters. As long as you use spam filters on your e-mail, I can continue to reach my real intended targets, those non-slashdotters who do not know better and will buy my products or click through to my client’s websites. Your filters really help cut down on the complaints to the Internet service providers I do business with, and as long as not too many complaints come in their marketing people assure me we can do business. Of course, I still waste your bandwidth and mailbox capacity, but you no longer complain to uce@ftc.gov, my access providers, or anyone else who might cause me problems. My yahoo and hotmail and other accounts for replies are lasting much longer before getting shut down because someone complained to these service providers. And my clients are even reporting that they can start mailing out 800 numbers like 1-800-901-3719 again and they will not have you damn geeks set up your modems to keep autodialing them, since you spend your own time and effort to filter the e-mail and only clueless users who might actually call will see the numbers.