MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / is_pattern

Method is_pattern

pydevd_attach_to_process/winappdbg/textio.py:183–195  ·  view source on GitHub ↗

Determine if the given argument is a valid hexadecimal pattern to be used with L{pattern}. @type token: str @param token: String to parse. @rtype: bool @return: C{True} if it's a valid hexadecimal pattern, C{False} otherwise.

(token)

Source from the content-addressed store, hash-verified

181
182 @staticmethod
183 def is_pattern(token):
184 """
185 Determine if the given argument is a valid hexadecimal pattern to be
186 used with L{pattern}.
187
188 @type token: str
189 @param token: String to parse.
190
191 @rtype: bool
192 @return:
193 C{True} if it's a valid hexadecimal pattern, C{False} otherwise.
194 """
195 return re.match(r"^(?:[\?A-Fa-f0-9][\?A-Fa-f0-9]\s*)+$", token)
196
197 @classmethod
198 def integer_list_file(cls, filename):

Callers

nothing calls this directly

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected