From: Rob Biedenharn Date: 2009-07-18T01:15:24+09:00 Subject: Re: regexp exclusion search - find matches NOT ending with a string? On Jul 17, 2009, at 11:30 AM, Glenn Jackman wrote: > At 2009-07-16 08:59PM, "David A. Black" wrote: >> On Fri, 17 Jul 2009, BrendanC wrote: >>> $(?> >> I would probably do: >> >> lines.reject {|line| line =~ /html$/ } > > Is the Ruby regular expression syntax documented anywhere? > > I was attempting to use a look-behind, but it's not supported. > > The syntax is not documented in the RegExp rdocs, and I haven't seen a > site that spells out all the nitty-gritty details and pokes into the > dark corners. > > I'm looking for the Ruby equivalent of: > http://www.tcl.tk/man/tcl8.5/TclCmd/re_syntax.htm > http://docs.python.org/library/re.html#regular-expression-syntax > http://perldoc.perl.org/perlre.html > > Does it exist? > > > -- > Glenn Jackman > Write a wise saying and your name will live forever. -- Anonymous > You could try the Regular Expressions section of the Standard Types chapter of Programming Ruby. Be advised that this is the online version of the 1st edition that is now 8 years old. Since you seem to be using a version 1.8.x of Ruby, the Regexp parts are going to be mostly the same. http://www.ruby-doc.org/docs/ProgrammingRuby/ -Rob Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com