# File lib/dbi/sql/preparedstatement.rb, line 40 def tokens @sql.scan(%r{ ( -- .* (?# matches "--" style comments to the end of line or string ) | - (?# matches single "-" ) | /[*] .*? [*]/ (?# matches C-style comments ) | / (?# matches single slash ) | ' ( [^'\\] | '' | \\. )* ' (?# match strings surrounded by apostophes ) | " ( [^"\\] | "" | \\. )* " (?# match strings surrounded by " ) | \?\?? (?# match one or two question marks ) | [^-/'"?]+ (?# match all characters except ' " ? - and / ) )}x).collect {|t| t.first} end