From: "Jozef Rešetár" Date: 2012-04-13T21:38:00+09:00 Subject: problem with \w Hi there, please help me with my problem. you want to create from "?X is parent of ?Y" ===>> "(\w+) is parent of (\w+)" I was trying something like: "?X is parent of ?Y".gsub(/\?[A-Z]/) { "(\\\\w+)" } "?X is parent of ?Y".gsub(/\?[A-Z]/) { "(\\\w+)" } "?X is parent of ?Y".gsub(/\?[A-Z]/) { "(\\w+)" } "?X is parent of ?Y".gsub(/\?[A-Z]/) { "(\w+)" } but nothing, thx in forward, p.s. irb 0.9.6(09/06/30) ruby 1.9.3p125 (2012-02-16 revision 34643) [universal.x86_64-darwin10] -- Posted via http://www.ruby-forum.com/.