Introducing SymbolSpeak v.0 beta (beta beta beta)
Tuesday November 16th 2004
Last week I was given the fun challenge of writing a script to harvest all emails from a series of Rich Text Format files. All 6,000 of them. This was obviously a job for Regular Expressions, which is a method of searching for patterns in text bodies, not simply static strings. For example, instead of searching for all '@' signs, or '.com' strings, I could search for any @ sign that occurred between a series of letters, dashes, underscores, or periods. If it sounds neat, it is. . . If it sounds complex, it is.
Because this was for my day job, the script had to be written in Lasso 6, but because I've yet to hone the skills of searching for Lasso tutorials online, I began with PHP. I knew that RegExp patterns were by and large the same from language to language, so as long as I got a good starting point in PHP, I knew I could translate it over to Lasso. . .
To make a long story short, I figured it out, whipped up a smart (albeit admittedly ugly and hastily assembled) little app that did just what was required, even stripping out duplicates and unneccessary addresses, like those from our internal server, postmasters, administrators, etc.
The point of this is that it got my mind reeling on the power and potential of Regular Expressions. I have long known them to be the answer to some of the big picture problems I've had in revamping my own site's CMS, but hadn't had the opportunity to dig into the syntax and behavior of RegExps to figure it out. But over a series of late nights I've finally taken a bold stab at it, and am extremely excited by what I've done. This is, without a doubt, very very basic, and probably very buggy, but I've got to start somewhere.
So allow me to introduce SymbolSpeak, version 0.0 beta (beta beta beta). It's purpose is to allow myself (or site visitors leaving comments) to format site posts without having to insert clunky HTML code, as well as be able to display HTML code to the browser when I'm trying to give an example or script excerpt. I have begun developing a very basic formatting syntax, like **bold** making a word bold, and //italics// making a word italicized. Links and emails too.
Already I have encountered complications, like with different browsers encoding HTML-embedded tags in varied ways, and the order in which text is reformatted is still up in the air, but this is a heck of a first step.
So check it out, try your best to break it (*wince*, it probably won't be that hard), and email me your thoughts. . .
"SymbolSpeak" as a name is still up for review. . . hmmm . . .