From: Pit Capitain Date: 2007-08-09T15:52:32+09:00 Subject: Re: Alternate Regular Expressions? 2007/8/8, Robert Klemme : > Did you think about something like this (attached)? This is just a > raw hack to illustrate a possible way to do it. Quote: > mail_addr = TextualRegexp.new do > anchor :beginning > > group :capturing do > at_least_once { any "a-z" } > end > > literal "@" > > repeat 1..4 do > at_least_once { any "a-z" } > literal "." > end > > any %w{com edu org} > end I like this! A readable DSL for regular expressions. Regards, Pit