Genii Weblog

Regular Expression support in Midas 4.00

Fri 1 Feb 2008, 10:57 AM



by Ben Langhinrichs
The gnomes (see here) have asked me to share a teaser about Midas 4.0 support for regular expressions.  It is pretty cool, if I say so myself.  For example, there is a new RegexLink method which allows you to match a regular expression in rich text and turn the match into a URL.  Whether you wanted to recognize that Shirley.Temple@GoodShipLollipop.com was an e-mail address and turn it into a mailto link, or that F2B7C11522EB3F41852573E20048B158 was a UNID and turn it into a Notes URL or that a FedEx tracking number should be turned into a URL hotspot to check the status, or a product code should turn into a lookup for that product, or whatever you want.  Now, I know that IBM has introduced something a bit like this for Eclipse plug-ins, and I am sure it will be very cool for that use, but some people don't have Notes 8.0.1 yet, or don't want to write a plug-in, or want this to work from the web, or want more flexibility than the Eclipse plug-in method allows.  Even I am not sure all the uses the gnomes will find for this.  Syntax highlighting with the RegexHighlight method, perhaps.  Data mining using the RegexKeywords method, probably.  CamelCase recognition with a regular expression such as:

([A-Z]{1,1}[a-z]+){2,}

and so on and so on.

I see there is even a related IdeaJam wish....

Copyright © 2008 Genii Software Ltd.

What has been said:


670.1. Ben Poole
(01/02/2008 09:03)

That is really very cool :)


670.2. Ben Langhinrichs
(02/01/2008 09:09 AM)

Thanks. There is more cool stuff to come, but the gnomes haven't finished documenting it yet.


670.3. mark
(02/01/2008 11:00 AM)

Excellent addition ben, of course, regex has been in ZMerge for well... a long time. :-)