Just as a point of reference, the actual regex for your whatever is
[a-z]{4}[0-9]{4}[a-z]{4}[0-9]

However, the real question is, how would the system know (for example) that
you meant for X and 1 to be indicative of [a-z] and [0-9] instead of a
literal capital x and the literal numeral 1?  Language theory states that
any system you create in this way must have a syntax as complex as (or more
complex than) the maximum complexity of regular expression it can create.
About the best you can do is make the system easier to use by doing things
like making the syntax more user-friendly or creating a visual editor for
them.  Oh, wait.  Michael's got that second one in progress.  :-)

Remember, you can't guarantee the systematic creation of a regex by example
unless you can guarantee all possible responses will be included in the
examples.  That is, you can't guarantee that a systematically generated
regex will match email addresses properly unless you can give it one of each
possible type of email address, which is a /very/ long list.  It would take
more time and effort to do it this way than to just write the regex to begin
with.

Take, for example, your example of "[EMAIL PROTECTED]"  The very simplest
regex that matches this is "[EMAIL PROTECTED]" which doesn't match anything
else.  How do you propose to make it understand that "tony" matches a whole
lot of different things but that you have to have that "@" and the "."?

I'm not trying to be harsh or critical, just trying to point out why what
you are proposing doesn't seem (to me at least) practical or, really, even
feasable.


--  Ben Doom
    Programmer & General Lackey
    Moonbow Software, Inc

: -----Original Message-----
: From: Tony Weeg [mailto:[EMAIL PROTECTED]
: Sent: Sunday, July 13, 2003 6:31 PM
: To: CF-Talk
: Subject: RE: (OT) RegEx editor
:
:
: have you seen the kde one that we bought?
:
: where you have drag and drop matches...
:
: i would rather go the other way.  lets say i type in a variation of a
: string type layout that i want to match against.
:
: string layout: XXXX1111XXXX1
: where x = any character a-z
: where 1 = any number 0-9
:
: and it would turn out...
:
: [az,4][09,4][az,4][09,1]
:
: or something like that, im not sure of the real
: regex for my demo.
:
: does that make more sense?
:
: tw
:
: -----Original Message-----
: From: Ben Doom [mailto:[EMAIL PROTECTED]
: Sent: Sunday, July 13, 2003 6:27 PM
: To: CF-Talk
: Subject: RE: (OT) RegEx editor
:
:
: : i would love to put some words in a form box..
: :
: : say for instance...
: :
: : [EMAIL PROTECTED]
: :
: : and then the regex interprets that, and turns it
: : into some sort of
: :
: : @[EMAIL PROTECTED]([EMAIL PROTECTED])%($#([EMAIL PROTECTED])*!@)#$_
: :
: : thing.
: :
: : make sense?
:
: Not really.
:
: : and maybe a wizard type thing...where it could say, do you want
: : to match...blah's as well? or maybe a blah here or there.
:
: If by this you mean things like character classes or this/that/the other
: choices, I think the editor will take care of that.  However, your
: description is a bit vague.
:
:
: --  Ben Doom
:     Programmer & General Lackey
:     Moonbow Software, Inc
:
:
:
: 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to