Wednesday, May 4, 2011

Using parameters in regular expressions

Here is an example on how to use parameters in a regular expression:

if not checkintext.match(/(#{checkfortxt})/)
  raise "Text '" + checkfortxt + "' not found!"
end

No comments:

Post a Comment