# File formvalidator.rb, line 766 def match_postcode(code) regexp = Regexp.new('^([ABCEGHJKLMNPRSTVXYabceghjklmnprstvxy] [_\W]*\d[_\W]*[A-Za-z][_\W]*[- ]?[_\W]*\d[_\W]* [A-Za-z][_\W]*\d[_\W]*)$', Regexp::EXTENDED) match = regexp.match(code) match ? match[0] : nil end