Fun with regular expressions

Regular Expression Too Complicated Error MessageI’m working on transforming html files containing full Shakespeare plays, cleaning up the tags and adding some semantic content we need to have for a customer project. I’ve been prototyping with the nice Perl-based regular expression in good old UltraEdit, my editor-of-choice for a long time now.

In the course of referring to the UE web site for syntax and other tips, I discovered that UE has a scripting feature I just never paid any attention to. So now I’m gluing together my regEx transforms with javascript and running them in batches as I figure things out.

But I just blew my poor editor’s mind and got one of the better error messages.

I had thought that a few were getting a bit hard to understand. As in:

 strFind = '(?s)(go-scene-)(.*)(</h3>)(.*)(<a )(.*)(line-)(.*)1""';
 strReplace = '\\1\\2\\3\\r\\n<a id="go-\\80" name="line-\\80"></a><br />\\4\\5\\6\\7\\81';

BTW, when I told my daughter Becky a couple of weeks ago that I was embarking on a little regular expression project, she immediately shot back with an XKCD oldie-but-goodie that was new to me:

xkcd regex cartoon

 

#SheridanCommute: Morning hot air

Balloon LandingBack when we lived in Vermont, hot air balloons flying over the house and even landing in our field, were a fairly regular event for us due to our proximity to the tiny Post Mills airport. But they are rare here in Sheridan, or have been. I’ve heard this guy outside the house a few times lately and caught a glimpse or two. But Labor Day morning, we had a good view as it floated in low and slow to a landing across the gulch from us.

#SheridanCommute: Baby turtles on the move

SnappingTurtleBaby
The wind was so strong the last time I rode my bike to work that I came down the hill on the Holly Ponds pathway, which is the most sheltered of my options. As I came across the bridge right behind the hospital, I dodged a decent-sized pebble on the pathway, then another. Then I realized the pebbles were moving!

Baby turtles, snappers I think, were working their way down the pathway towards the ponds, making pretty good time on their stubby little legs. If you look carefully, you should be able to spot five of the six in the photo below. The closeup is of #6 who was trailing far behind the others and looking a bit weary.
HollyPondsTurtles

Android app development cross pollination

SnapToMe Plus iconToday I had the pleasure of pushing the new generation of our SnapTo apps to the Google Play Store. Our three apps, SnapToMe, SnapToMe Plus, and MyDumbBoard are all variations on a theme: give the new or very busy phone user the simplest possible way to snap a picture straight to his or her email inbox. The new Version 2.0 editions are a great demonstration of how the retail products of an Android app developer can benefit from custom app development projects and vice versa.

Frankly, it doesn’t take a lot of key strokes to email yourself a picture from your Android photo gallery. But if you are a novice user, that process is just one-more-thing-to-master. Or, if you are a busy retailer or seminar leader or real estate agent and you routinely need to send yourself pictures to document a problem or record a whiteboard or take note of an opportunity, any extra steps can turn should-be-easy into never-quite-got-it-done. Especially if you don’t always have connectivity and need to remember to do the mailing later when you get back in cell range.

The SnapTo apps all make taking one picture straight to your email inbox a two-click operation. And all but the free app make that work even if you don’t have connectivity when you take the picture.

The new versions of our three apps were inspired by contract Android app development we did this spring for CaptureBites, a Belgian company. Continue Reading →