class_docstr: Validate a string based on a regular expression.
  
  Example::
  
      parser = reqparse.RequestParser()
      parser.add_argument('example', type=inputs.regex('^[0-9]+$'))
  
  Input to the ``example`` argument will be rejected if it contains anything
  but numbers.
  
  :param str pattern: The regular expression the input must match
class_docstr_tok: ["Validate","a","string","based","on","a","regular","expression",".","Example",":",":","parser","=","reqparse.RequestParser","(",")","parser.add_argument","(","'example","'",",","type=inputs.regex","(","'^","[","0-9","]","+","$","'",")",")","Input","to","the","``","example","``","argument","will","be","rejected","if","it","contains","anything","but","numbers",".",":","param","str","pattern",":","The","regular","expression","the","input","must","match"]
code: def __deepcopy__(self, memo):
      return regex(self.pattern)
  
imports: from __future__ import unicode_literals
  import re
  import socket
  from datetime import datetime, time, timedelta
  from email.utils import parsedate_tz, mktime_tz
  from six.moves.urllib.parse import urlparse
  import aniso8601
  import pytz
label_desc: Use image node_id 3 for calling the regex obj's underlying member method code with example usage: obj.__deepcopy__(memo) and returns: regex