From: Wes Gamble Date: 2006-03-29T03:24:36+09:00 Subject: Regexp to match strings that _don't_ being with a string I would like to write a regexp that will match a string that does NOT start with a specified set of characters. For example, Given: xyz123 asldfhsl xyk2345 and assume that I want to see only strings that don't start with "xyz" (so in this case, the last 2 in the list). I tried /^[^(xyz)]/ but I don't trust it. I don't think the grouping will take inside the character class. Do I need a negative lookahead assertion? Thanks, Wes -- Posted via http://www.ruby-forum.com/.