I have a regular expression:
Regexp.new(/^(\w+([-']\w+)*)(\ \w+([-']\w+)*)+$/)
and I need to know the position of a invalid character.

For example, if a invalid character is a number, I can recover it using:
"gisele bund9chen".index(/\d/)

But, I need generalize the regular expression to find any a character
different of \w, space \' and \-.

Thanks,
Carlos Camargo

-- 
Posted via http://www.ruby-forum.com/.