From: Robert Klemme Date: 2009-10-06T05:25:04+09:00 Subject: Re: regex simplifier? On 10/05/2009 03:27 PM, Ilan Berci wrote: > Roger Pack wrote: >> Currently I am somewhat of a novice to regex's. >> For example, I can't remember what \d means versus \D -- which one is a >> digit, and which one isn't? > After you play with it for awhile, it starts to follow a fairly > consistent pattern. :) > > Usually, a capital implies a negation.. for example > \D <- NOT a number > \S <- NOT a space(like) character > \W <- NOT a word character.. > > etc.. The fact that there apparently are not many libraries for readable regular expressions in use seems to indicate that people are mostly using the native syntax of a regexp engine. Apparently it's not that hard. Roger, I recommend "Mastering Regular Expressions" - that's a really good book on the matter and it covers the topic quite well without delving too deep into the theory of formal language. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/