From: Timothy Hunter Date: 2006-07-31T09:21:06+09:00 Subject: Re: Howto Delete 3 Leftmost Characters Jeff Pritchard wrote: > Esteban Manchado =?iso-8859-1?Q?Vel=E1zquez?= wrote: > >> ...snip... >> That is, "remove, from the beginning of the line, '#ip' followed by one >> or >> more space characters (be them spaces, tabs or whatever)".> >> ...snip... >> Regards, >> > > Reading this explanation of the regexp that was provided reminded me > again of a question that has been haunting me for awhile. Has anyone > written an "English language to Regexp" converter? > > It seems to me that for relatively simple cases it should be relatively > easy to set up something similar to the way most email apps do rule > building for filtering messages, with a drop down list of "contains, > starts with, doesn't contain, ends with, ...) and a couple of buttons > for adding/removing another line of such stuff. Sort of a wizard for > building RegExp. > > Unless you write two or three RegExp's a day, it seems nearly impossible > to remember this arcane but useful syntax. Being able to write them in > plain English or build one with some simple drop downs and check boxes > etc. would certainly save me some pain on occasion. I've searched for > something like this before but never found anything. > > jp > > Sounds like a Ruby Quiz to me! However, I've used a variety of these GUI-based regex builders in the past and never found them to much more than a curiosity. The regular expression syntax is so precise and exact that I find it frustrating to have to pick through all the choices and click things. Invariably I end up just writing the damn regex by hand. I would think that an English language equivalent to regex syntax would simply replace hard-to-remember regular expressions with hard-to-remember English phrases. Regular expressions are no harder to learn than any other programming language. You need a good reference (for me it has to be on paper) and some practice. That's all.