100+ results results for 're.compile lang:python' (4627 ms)
38 39 return [re.compile(r'\s*' + c, re.IGNORECASE) for c in compileCommands] 40 49 usual_suspects = { 50 exp: re.compile(r'.*' + exp, re.IGNORECASE) for exp in [ 51 r'flurryagent', 73 74 gradle_mavenrepo = re.compile(r'maven *{ *(url)? *[\'"]?([^ \'"]*)[\'"]?') 75 75 76 allowed_repos = [re.compile(r'^https?://' + re.escape(repo) + r'/*') for repo in [ 77 'repo1.maven.org/maven2', # mavenCentral() 145 # False positives patterns for files that are binary and executable. 146 safe_paths = [re.compile(r) for r in [ 147 r".*/drawable[^/]*/.*\.png$", # png drawablescontroller.py https://gitlab.com/abhi1tb/build | Python | 376 lines
17 18URI = re.compile(r"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?") 19vboxmanage.py https://gitlab.com/ricardo.hernandez/salt | Python | 508 lines
31 32UUID_RE = re.compile('[^{0}]'.format('a-zA-Z0-9._-')) 33NAME_RE = re.compile('[^{0}]'.format('a-zA-Z0-9._-'))decoder.py https://gitlab.com/pooja043/Globus_Docker_2 | Python | 400 lines
40 41STRINGCHUNK = re.compile(r'(.*?)(["\\\x00-\x1f])', FLAGS) 42BACKSLASH = { 138 139WHITESPACE = re.compile(r'[ \t\n\r]*', FLAGS) 140WHITESPACE_STR = ' \t\n\r'cache.py https://gitlab.com/themill/ftrack-python-api | Python | 579 lines
97 if pattern is not None: 98 pattern = re.compile(pattern) 99etree.py https://gitlab.com/phongphans61/machine-learning-tictactoe | Python | 343 lines
15 16tag_regexp = re.compile("{([^}]*)}(.*)") 17win_tool.py https://gitlab.com/boxnia/NFU_MOVIL | Python | 314 lines
23# link.exe. 24_LINK_EXE_OUT_ARG = re.compile('/OUT:(?P<out>.+)$', re.IGNORECASE) 25html2text.py https://gitlab.com/reymor/odoo-version7 | Python | 459 lines
14import urlparse 15sgmllib.charref = re.compile('&#([xX]?[0-9a-fA-F]+)[^0-9a-fA-F]') 16 82 83r_unescape = re.compile(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));") 84def unescape(s):flp.py https://bitbucket.org/__wp__/mb-linux-msli.git | Python | 451 lines
271import re 272prog = re.compile('^([^:]*): *(.*)') 273readability.py https://gitlab.com/zouxc/cola | Python | 368 lines
38REGEXES = { 39 'unlikelyCandidatesRe': re.compile('combx|comment|disqus|foot|header|menu|meta|nav|rss|shoutbox|sidebar|aside|sponsor',re.I), 40 'okMaybeItsACandidateRe': re.compile('and|article|body|column|main',re.I), 40 'okMaybeItsACandidateRe': re.compile('and|article|body|column|main',re.I), 41 'positiveRe': re.compile('article|body|content|entry|hentry|page|pagination|post|text',re.I), 42 'negativeRe': re.compile('combx|comment|contact|foot|footer|footnote|link|media|meta|promo|related|scroll|shoutbox|sponsor|tags|widget',re.I), 42 'negativeRe': re.compile('combx|comment|contact|foot|footer|footnote|link|media|meta|promo|related|scroll|shoutbox|sponsor|tags|widget',re.I), 43 'divToPElementsRe': re.compile('<(a|blockquote|dl|div|img|ol|p|pre|table|ul)',re.I), 44 'replaceBrsRe': re.compile('(<br[^>]*>[ \n\r\t]*){2,}',re.I), 44 'replaceBrsRe': re.compile('(<br[^>]*>[ \n\r\t]*){2,}',re.I), 45 'replaceFontsRe': re.compile('<(\/?)font[^>]*>',re.I), 46 'trimRe': re.compile('^\s+|\s+$/'), 46 'trimRe': re.compile('^\s+|\s+$/'), 47 'normalizeRe': re.compile('\s{2,}/'), 48 'killBreaksRe': re.compile('(<br\s*\/?>(\s| ?)*){1,}/'),app.py https://gitlab.com/jennings.p.c/ase-f-ase | Python | 459 lines
108# Find numbers in formulas so that we can convert H2O to H<sub>2</sub>O: 109SUBSCRIPT = re.compile(r'(\d+)') 110Checker.py https://gitlab.com/t0b3/m2crypto | Python | 297 lines
66 67 numericIpMatch = re.compile('^[0-9]+(\.[0-9]+)*$') 68 258 certHost = certHost.replace('*', '[^\.]*') 259 if re.compile('^%s$' % (certHost)).match(host): 260 return Truemetadata.py https://gitlab.com/areema/myproject | Python | 317 lines
38# in METADATA/PKG-INFO. Support its syntax with the extra at the end only. 39EXTRA_RE = re.compile("""^(?P<package>.*?)(;\s*(?P<condition>.*?)(extra == '(?P<extra>.*?)')?)$""") 40KEYWORDS_RE = re.compile("[\0-,]+")toc.py https://gitlab.com/Haritiana/Python-Markdown | Python | 310 lines
31 32IDCOUNT_RE = re.compile(r'^(.*)_([0-9]+)$') 33 139 140 self.header_rgx = re.compile("[Hh][123456]") 141DSSP.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 346 lines
38# Match C in DSSP 39_dssp_cys=re.compile('[a-z]') 40SideBarItem.py https://gitlab.com/Blueprint-Marketing/sublime-config | Python | 476 lines
74 print '-------------------------------------------------------' 75 path4 = re.sub(re.compile("^"+re.escape(path2), re.IGNORECASE), '', path3); 76 print path4test_build_file_address_mapper.py https://gitlab.com/Ivy001/pants | Python | 281 lines
147 148 NO_FAIL_FAST_RE = re.compile(r"""^-------------------- 149.*hostmototube_blocked_spark_videos.py https://gitlab.com/zatoshi/iptvplayer-for-e2 | Python | 355 lines
104 if not sts: return 105 match = re.compile('<a class="submenu" href="([^"]+?)">([^<]+?)</a>').findall(data) 106 if match:dnsproxy.py https://gitlab.com/0072016/Google-5 | Python | 321 lines
31 32is_local_addr = re.compile(r'(?i)(?:[0-9a-f:]+0:5efe:)?(?:127(?:\.\d+){3}|10(?:\.\d+){3}|192\.168(?:\.\d+){2}|172\.(?:1[6-9]|2\d|3[01])(?:\.\d+){2})').match 33js2c.py https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk | Python | 396 lines
56 lines = re.sub(r'//.*\n', '\n', lines) # end-of-line comments 57 lines = re.sub(re.compile(r'/\*.*?\*/', re.DOTALL), '', lines) # comments. 58 lines = re.sub(r'\s+\n+', '\n', lines) # trailing whitespace 96 97EVAL_PATTERN = re.compile(r'\beval\s*\(') 98WITH_PATTERN = re.compile(r'\bwith\s*\(') 175 176CONST_PATTERN = re.compile(r'^const\s+([a-zA-Z0-9_]+)\s*=\s*([^;]*);$') 177MACRO_PATTERN = re.compile(r'^macro\s+([a-zA-Z0-9_]+)\s*\(([^)]*)\)\s*=\s*([^;]*);$') 177MACRO_PATTERN = re.compile(r'^macro\s+([a-zA-Z0-9_]+)\s*\(([^)]*)\)\s*=\s*([^;]*);$') 178PYTHON_MACRO_PATTERN = re.compile(r'^python\s+macro\s+([a-zA-Z0-9_]+)\s*\(([^)]*)\)\s*=\s*([^;]*);$') 179 192 value = const_match.group(2).strip() 193 constants.append((re.compile("\\b%s\\b" % name), value)) 194 else:html_completions.py https://gitlab.com/Blueprint-Marketing/sublime-config | Python | 263 lines
33 # Check the first location looks like an expression 34 rex = re.compile("([\w-]+)([.#])(\w+)") 35 expr = match(rex, lines[0])download.py https://gitlab.com/aguai/lilykde | Python | 340 lines
36# parse version of a LilyPond package 37_version_re = re.compile(r'(\d+(\.\d+)+)(-(\d+))?') 38setup_ios_gn.py https://github.com/chromium/chromium.git | Python | 405 lines
39LLDBINIT_SKIP_PATTERNS = ( 40 re.compile('^script sys.path\\[:0\\] = \\[\'.*/src/tools/lldb\'\\]$'), 41 re.compile('^script import lldbinit$'), 41 re.compile('^script import lldbinit$'), 42 re.compile('^settings append target.source-map .* /google/src/.*$'), 43) 58 59 ENV_VAR_PATTERN = re.compile(r'\$([A-Za-z0-9_]+)') 60manifest.py https://gitlab.com/actawithamana/poky | Python | 344 lines
297 with open(self.full_manifest, 'w+') as manifest: 298 pkg_re = re.compile('^Installing ([^ ]+) [^ ].*') 299 for line in set(output.split('\n')):HTMLParser.py https://gitlab.com/dahbearz/CRYENGINE | Python | 393 lines
15 16interesting_normal = re.compile('[&<]') 17interesting_cdata = re.compile(r'<(/|\Z)') 17interesting_cdata = re.compile(r'<(/|\Z)') 18incomplete = re.compile('&[a-zA-Z#]') 19 19 20entityref = re.compile('&([a-zA-Z][-.a-zA-Z0-9]*)[^a-zA-Z0-9]') 21charref = re.compile('&#(?:[0-9]+|[xX][0-9a-fA-F]+)[^0-9a-fA-F]') 22 23starttagopen = re.compile('<[a-zA-Z]') 24piclose = re.compile('>') 24piclose = re.compile('>') 25commentclose = re.compile(r'--\s*>') 26tagfind = re.compile('[a-zA-Z][-.a-zA-Z0-9:_]*')sort_includes.py https://gitlab.com/pranith/gem5 | Python | 317 lines
69 70include_re = re.compile(r'([#%])(include|import).*[<"](.*)[">]') 71def include_key(line): 97 98 rex = re.compile(r'^(%s)\s*%s(.*)%s(.*)$' % (keyword, delim[0], delim[1])) 99 110 111 rex = re.compile(fname) 112 base_matcher = _include_matcher(**kwargs) 128 base_matcher = _include_matcher(delim='""') 129 rex = re.compile(r"^src/(.*)\.([^.]+)$") 130 header_map = {xunit.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 332 lines
54# Invalid XML characters, control characters 0-31 sans \t, \n and \r 55CONTROL_CHARACTERS = re.compile(r"[\000-\010\013\014\016-\037]") 56 56 57TEST_ID = re.compile(r'^(.*?)(\(.*\))$') 58csrf.py https://gitlab.com/gregtyka/Scryve-Webapp | Python | 294 lines
18_POST_FORM_RE = \ 19 re.compile(r'(<form\W[^>]*\bmethod\s*=\s*(\'|"|)POST(\'|"|)\b[^>]*>)', re.IGNORECASE) 20version.py https://gitlab.com/abhi1tb/build | Python | 420 lines
123 124_legacy_version_component_re = re.compile(r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE) 125 214 215 _regex = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.VERBOSE | re.IGNORECASE) 216 363 364_local_version_separators = re.compile(r"[\._-]") 365config.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 284 lines
21 22nonascii_re = re.compile(b(r'[\x80-\xff]')) 23microcode-tool.py https://gitlab.com/gmbnomis/u-boot | Python | 317 lines
49 """ 50 re_date = re.compile('/\* *(.* [0-9]{4}) *\*/$') 51 re_license = re.compile('/[^-*+] *(.*)$') 51 re_license = re.compile('/[^-*+] *(.*)$') 52 re_name = re.compile('/\* *(.*)\.inc *\*/', re.IGNORECASE) 53 microcodes = {}pyv8loader.py https://gitlab.com/Blueprint-Marketing/sublime-config | Python | 383 lines
154 if e.returncode == 8: 155 regex = re.compile('^.*ERROR (\d+):.*', re.S) 156 if re.sub(regex, '\\1', error_line) == '503':colorizer.py https://gitlab.com/abhi1tb/build | Python | 336 lines
30 31prog = re.compile(make_pat(), re.S) 32idprog = re.compile(r"\s+(\w+)", re.S)ImImagePlugin.py https://gitlab.com/abhi1tb/build | Python | 377 lines
103 104split = re.compile(br"^([A-Za-z][^:]*):[ \t]*(.*)[ \t]*$") 105test_searchengine.py https://gitlab.com/abhi1tb/build | Python | 330 lines
96 line = "Here is an 'is' test text." 97 prog = re.compile('is') 98 Equal(se.search_reverse(prog, line, len(line)).span(), (12, 14)) 170 temppat = engine.getprog() 171 Equal(temppat.pattern, re.compile('Hello', re.IGNORECASE).pattern) 172 engine.casevar.set(1) 173 temppat = engine.getprog() 174 Equal(temppat.pattern, re.compile('Hello').pattern, 0) 175 214 cls.text.insert('1.0', test_text) 215 cls.pat = re.compile('target') 216 282 cls.text.insert('1.0', test_text) 283 cls.pat = re.compile('target') 284 cls.res = (2, (10, 16)) # line, slice indexes of 'target'validators.py https://gitlab.com/johnfromthefuture/TA-fuzzy | Python | 394 lines
114 """ 115 pattern = re.compile(r'''[_.a-zA-Z-][_.a-zA-Z0-9-]*$''') 116 326 self.name = six.text_type(name) 327 self.pattern = re.compile(pattern, flags) 328 344 """ 345 pattern = re.compile(r'''(?=\w)[^\d]\w*$''', re.UNICODE) 346 365 try: 366 value = re.compile(six.text_type(value)) 367 except re.error as error:printing.py https://gitlab.com/infected_/sm_arm-linux-androideabi-4.9.x | Python | 285 lines
174 self.gen_printer = gen_printer 175 self.compiled_re = re.compile(regexp) 176test_filelist.py https://gitlab.com/unofficial-mirrors/cpython | Python | 340 lines
139 # is a regex 140 regex = re.compile('a') 141 self.assertEqual(ElementPath.py https://gitlab.com/envieidoc/Clover | Python | 303 lines
60 61xpath_tokenizer_re = re.compile( 62 "("chordpro_parser.py https://gitlab.com/petern3/guitar_music | Python | 348 lines
15 16CHORD_REGEX = re.compile("(?P<chord>(?P<root>[A-G][#b]?)(?P<mod>(m|sus|add|maj|dim|aug)?[0-9]?)*(?P<bass>\/[A-G][#b])?)") 17INSTRUCTION_REGEX = re.compile("\(?(?P<instruction>[Rr]ing|[Mm]ute|[Rr]ake|PM|pm)\)?") 45 regex = "( *({0}|{1}))+".format(CHORD_REGEX.pattern, INSTRUCTION_REGEX.pattern) 46 return re.compile(regex) 47 53 regex = " *(?P<pre>pre)?[ \-]?(?P<label>{0}) *(?P<value>x?[0-9]*)".format(middle[:-1]) 54 return re.compile(regex, re.IGNORECASE) 55 61 regex = " *(?P<info>{0})\W+(?P<value>[0-9]+|.+)".format(middle[:-1]) 62 return re.compile(regex, re.IGNORECASE) 63 66 regex = "\s*(\|{0,2}[A-Gb]?\|{0,2}[-x0-9|:]{4,})" 67 return re.compile(regex) 68apiclient-rax.py https://gitlab.com/kawsark/pyrestclient | Python | 178 lines
20 f = open(credentials_file, 'r') 21 pattern = re.compile("\s*\[rackspace_cloud\]\s*username\s*=\s*(\S*)\s*api_key\s*=\s*(\S*)") 22 match = pattern.search(f.read()) 38 #Extract token from response: 39 p1 = re.compile("token.*\"id\":\"(.*?)\",") 40 m1 = p1.search(r.text) 43 #Extract tenantId from response: 44 p2 = re.compile("\"tenantId\":\"(\d*?)\",") 45 m2 = p2.search(r.text)core.py https://gitlab.com/Mirros/XX-net | Python | 387 lines
9_alabel_prefix = b'xn--' 10_unicode_dots_re = re.compile(u'[\u002e\u3002\uff0e\uff61]') 11vintage_motions.py https://gitlab.com/Blueprint-Marketing/sublime-config | Python | 375 lines
164 if repeat == 1: 165 re_brackets = re.compile(r"([(\[{])|([)}\])])") 166 def move_to_next_bracket(pt):api.py https://gitlab.com/mkerfoot/home-assistant | Python | 399 lines
49 hass.http.register_path( 50 'GET', re.compile(r'/api/states/(?P<entity_id>[a-zA-Z\._0-9]+)'), 51 _handle_get_api_states_entity) 52 hass.http.register_path( 53 'POST', re.compile(r'/api/states/(?P<entity_id>[a-zA-Z\._0-9]+)'), 54 _handle_post_state_entity) 55 hass.http.register_path( 56 'PUT', re.compile(r'/api/states/(?P<entity_id>[a-zA-Z\._0-9]+)'), 57 _handle_post_state_entity) 58 hass.http.register_path( 59 'DELETE', re.compile(r'/api/states/(?P<entity_id>[a-zA-Z\._0-9]+)'), 60 _handle_delete_state_entity) 64 hass.http.register_path( 65 'POST', re.compile(r'/api/events/(?P<event_type>[a-zA-Z\._0-9]+)'), 66 _handle_api_post_events_event)subversion.py https://gitlab.com/phongphans61/machine-learning-tictactoe | Python | 329 lines
22 23_svn_xml_url_re = re.compile('url="([^"]+)"') 24_svn_rev_re = re.compile(r'committed-rev="(\d+)"') 24_svn_rev_re = re.compile(r'committed-rev="(\d+)"') 25_svn_info_xml_rev_re = re.compile(r'\s*revision="(\d+)"') 26_svn_info_xml_url_re = re.compile(r'<url>(.*)</url>')ldif.py https://gitlab.com/pmuontains/Odoo | Python | 453 lines
37dn_pattern = rdn_pattern + r'([ ]*,[ ]*' + rdn_pattern + r')*[ ]*' 38dn_regex = re.compile('^%s$' % dn_pattern) 39 66SAFE_STRING_PATTERN = '(^(\000|\n|\r| |:|<)|[\000\n\r\200-\377]+|[ ]+$)' 67safe_string_re = re.compile(SAFE_STRING_PATTERN) 68gcycsbplot.py https://gitlab.com/abushoeb/gc-v1 | Python | 332 lines
53 54 line_re = re.compile(regex, re.I) 55 lines = ycsb_file.split("\n") 130 regex = "ops/sec;" 131 line_re = re.compile(regex, re.I) 132 lines = ycsb_file.split("\n")document.py https://gitlab.com/orvi2014/rcs-db-ext | Python | 275 lines
14# re from pep263 - but we use it both on bytes and strings. 15re_encoding_bytes = re.compile("coding[:=]\s*([-\w.]+)".encode("ascii")) 16re_encoding_text = re.compile("coding[:=]\s*([-\w.]+)")hostfighttube.py https://gitlab.com/kamoula77/iptvplayer-for-e2 | Python | 338 lines
94 return 95 match = re.compile("<a href='([^']+?)' class='level0'[^>]+?>([^<]+?)</a>").findall(data) 96 if len(match) > 0:introspection.py https://gitlab.com/areema/myproject | Python | 273 lines
7 8field_size_re = re.compile(r'^\s*(?:var)?char\s*\(\s*(\d+)\s*\)\s*$') 9FieldInfo = namedtuple('FieldInfo', FieldInfo._fields + ('default',))mail_global.py https://gitlab.com/yaojian/RenjuAI | Python | 295 lines
55 def __register_regex(self): 56 self.email_reg = re.compile('[^@|\s]+@[^@]+\.[^@|\s]+') 57 self.email_reg_2 = re.compile(u"[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-.]+)+") 57 self.email_reg_2 = re.compile(u"[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-.]+)+") 58 self.email_addr_ignore = re.compile(u'undisclosed-recipients|Mail Delivery Subsystem|Mail Delivery System', 59 flags=re.IGNORECASE) 59 flags=re.IGNORECASE) 60 self.email_html_br_tag = re.compile(u"<br.*?>|<p.*?>", flags=re.IGNORECASE | re.DOTALL) 61 self.email_html_tag = re.compile(u'<style.*?style>|<script.*?script>|<.*?>|[\r\t]{2,}| ', flags=re.IGNORECASE | re.DOTALL) 62 63 self.url_reg = re.compile('http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+') 64 self.unicode_reg = re.compile( 73 """ 74 self.time_standard = re.compile(u'^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$') 75 self.time_reg_map = {u'凌晨': 'AM', u'上午': 'AM', u'中午': 'PM', u'下午': 'PM', u'晚上': 'PM',PRESUBMIT.py https://github.com/chromium/chromium.git | Python | 262 lines
49 50 pattern = input_api.re.compile(r'#include\s+[<"](.+)\.mojom(.*)\.h[>"]') 51 public_folder = input_api.os_path.normpath('third_party/blink/public/') 207 """ 208 printf_re = input_api.re.compile(r'^\s*(printf\(|fprintf\(stderr,)') 209 errors = input_api.canned_checks._FindNewViolationsOfRule(tmxr200x.py https://gitlab.com/hjjvandam/ase | Python | 254 lines
82 # http://stackoverflow.com/questions/647655/python-regex-split-and-special-character 83 table = re.compile('(:.*:)').split(table) 84 # remove empty elementsquoprimime.py https://gitlab.com/pmuontains/Odoo | Python | 336 lines
56 57hqre = re.compile(r'[^-a-zA-Z0-9!*+/ ]') 58bqre = re.compile(r'[^ !-<>-~\t]')warnings.py https://gitlab.com/envieidoc/Clover | Python | 404 lines
70 "lineno must be an int >= 0" 71 item = (action, re.compile(message, re.I), category, 72 re.compile(module), lineno)dispatch.py https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk | Python | 387 lines
46 47_SOURCE_PATH_PATTERN = re.compile(r'(?i)_wsh\.py$') 48_SOURCE_SUFFIX = '_wsh.py'http.py https://gitlab.com/mayakarya/django | Python | 385 lines
21 22ETAG_MATCH = re.compile(r'(?:W/)?"((?:\\.|[^"])*)"') 23 30__T = r'(?P<hour>\d{2}):(?P<min>\d{2}):(?P<sec>\d{2})' 31RFC1123_DATE = re.compile(r'^\w{3}, %s %s %s %s GMT$' % (__D, __M, __Y, __T)) 32RFC850_DATE = re.compile(r'^\w{6,9}, %s-%s-%s %s GMT$' % (__D, __M, __Y2, __T)) 32RFC850_DATE = re.compile(r'^\w{6,9}, %s-%s-%s %s GMT$' % (__D, __M, __Y2, __T)) 33ASCTIME_DATE = re.compile(r'^\w{3} %s %s %s %s$' % (__M, __D2, __T, __Y)) 34 37 38FIELDS_MATCH = re.compile('[&;]') 39automarkup.py https://gitlab.com/pachecof/centos-stream-9 | Python | 293 lines
32# 33RE_function = re.compile(r'\b(([a-zA-Z_]\w+)\(\))', flags=ascii_p3) 34 37# 38RE_generic_type = re.compile(r'\b(struct|union|enum|typedef)\s+([a-zA-Z_]\w+)', 39 flags=ascii_p3) 44# 45RE_struct = re.compile(r'\b(struct)\s+([a-zA-Z_]\w+)', flags=ascii_p3) 46RE_union = re.compile(r'\b(union)\s+([a-zA-Z_]\w+)', flags=ascii_p3) 46RE_union = re.compile(r'\b(union)\s+([a-zA-Z_]\w+)', flags=ascii_p3) 47RE_enum = re.compile(r'\b(enum)\s+([a-zA-Z_]\w+)', flags=ascii_p3) 48RE_typedef = re.compile(r'\b(typedef)\s+([a-zA-Z_]\w+)', flags=ascii_p3) 53# 54RE_doc = re.compile(r'(\bDocumentation/)?((\.\./)*[\w\-/]+)\.(rst|txt)') 55expander.py https://gitlab.com/manoj-makkuboy/magnetism | Python | 204 lines
79 80 subst = re.compile("@@((?:[a-zA-Z_][a-zA-Z_0-9]*\\.)?[a-zA-Z_][a-zA-Z0-9_]*)(?::(properties|xml))?@@") 81 81 82 xmlMatch = re.compile("[<&'\"]") 83 def xmlEscape(m): 93 94 propertiesMatch = re.compile(r"[^ -~]") 95 def propertiesEscape(m):operations.py https://gitlab.com/benji-bou/urotechchallenge-Serenity | Python | 273 lines
46 masks = 'TOUCH|OVERLAPBDYDISJOINT|OVERLAPBDYINTERSECT|EQUAL|INSIDE|COVEREDBY|CONTAINS|COVERS|ANYINTERACT|ON' 47 mask_regex = re.compile(r'^(%s)(\+(%s))*$' % (masks, masks), re.I) 48 if not isinstance(arg, six.string_types) or not mask_regex.match(arg):wininst2wheel.py https://gitlab.com/areema/myproject | Python | 187 lines
14 15egg_info_re = re.compile(r'''(^|/)(?P<name>[^/]+?)-(?P<ver>.+?) 16 (-(?P<pyver>.+?))?(-(?P<arch>.+?))?.egg-info(/|$)''', re.VERBOSE)teepty.py https://gitlab.com/vectorci/gitsome | Python | 331 lines
29 30RE_HIDDEN = re.compile(b'(\001.*?\002)') 31RE_COLOR = re.compile(b'\033\[\d+;?\d*m')transformations.py https://gitlab.com/oytunistrator/snowscript | Python | 353 lines
343 344_newline_pattern = re.compile(r"\n") 345__init__.py https://gitlab.com/mkerfoot/home-assistant | Python | 415 lines
21 22RE_SANITIZE_FILENAME = re.compile(r'(~|\.\.|/|\\)') 23RE_SANITIZE_PATH = re.compile(r'(~|\.(\.)+)') 23RE_SANITIZE_PATH = re.compile(r'(~|\.(\.)+)') 24RE_SLUGIFY = re.compile(r'[^a-z0-9_]+') 25rvm.py https://gitlab.com/ricardo.hernandez/salt | Python | 458 lines
172 if output: 173 regex = re.compile(r'^[= ]([*> ]) ([^- ]+)-([^ ]+) \[ (.*) \]') 174 for line in output.splitlines(): 315 if output: 316 regex = re.compile('^ ([^ ]+)') 317 for line in output.splitlines(): 416 if output: 417 gems_regex = re.compile('^ ([^ ]+)') 418 gemset_regex = re.compile('^gemsets for ([^ ]+)')ElementPath.py https://gitlab.com/abhi1tb/build | Python | 405 lines
60 61xpath_tokenizer_re = re.compile( 62 r"("data.py https://gitlab.com/vipemb/yocto-study | Python | 362 lines
134 135__expand_var_regexp__ = re.compile(r"\${[^{}]+}") 136__expand_python_regexp__ = re.compile(r"\${@.+?}")nrlbot.py https://gitlab.com/g.davis13/nrlbot | Python | 344 lines
106 """.""" 107 script = soup.find('script', string=re.compile('window.config')) 108 return script.string 250 # this regular expression will match to '#can-h' & return 'can-h' 251 regex = re.compile('(?<=#)\w{3}(?:-\w)') 252 teams = re.findall(regex, text)templates.py https://gitlab.com/gregtyka/Scryve-Webapp | Python | 392 lines
26 27token_re = re.compile('%s|%s(?s)' % ( 28 r'[uU]?[rR]?("""|\'\'\')((?<!\\)\\\1|.)*?\1', 30)) 31directive_re = re.compile(r'(?<!\\)<%(?:(#)|(py(?:thon)?\b)|' 32 r'(?:\s*(\w+))\s*)(.*?)\s*%>\n?(?s)') 32 r'(?:\s*(\w+))\s*)(.*?)\s*%>\n?(?s)') 33escape_re = re.compile(r'\\\n|\\(\\|<%)') 34namestart_chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_'tex.py https://gitlab.com/dahbearz/CRYENGINE | Python | 431 lines
33 34re_bibunit = re.compile(r'\\(?P<type>putbib)\[(?P<file>[^\[\]]*)\]',re.M) 35def bibunitscan(self): 70 71re_tex = re.compile(r'\\(?P<type>include|bibliography|putbib|includegraphics|input|import|bringin|lstinputlisting)(\[[^\[\]]*\])?{(?P<file>[^{}]*)}',re.M) 72"""Regexp for expressions that may include latex files""" 73 74g_bibtex_re = re.compile('bibdata', re.M) 75"""Regexp for bibtex files""" 113 nodes = [node] 114 re_aux = re.compile(r'\\@input{(?P<file>[^{}]*)}', re.M) 115text.py https://gitlab.com/areema/myproject | Python | 435 lines
25# Set up regular expressions 26re_words = re.compile(r'<.*?>|((?:\w[-\w]*|&.*?;)+)', re.U | re.S) 27re_chars = re.compile(r'<.*?>|(.)', re.U | re.S) 27re_chars = re.compile(r'<.*?>|(.)', re.U | re.S) 28re_tag = re.compile(r'<(/)?([^ ]+?)(?:(\s*/)| .*?)?>', re.S) 29re_newlines = re.compile(r'\r\n|\r') # Used in normalize_newlines 29re_newlines = re.compile(r'\r\n|\r') # Used in normalize_newlines 30re_camel_case = re.compile(r'(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))') 31 334# for single-quoted strings). 335smart_split_re = re.compile(r""" 336 ((?: 383 384_entity_re = re.compile(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));") 385tsvconverter.py https://gitlab.com/cobhuni/wiki_export | Python | 368 lines
134 _ARABIC_VOWELS = list(util.tochar(d)[0] for d in config['arabic vocalic diacritics'].values()) 135 _VOWELS_ERROR = re.compile(r'[%s]{2,}' % ''.join(_ARABIC_VOWELS)) 136hostwrestlingnetwork.py https://gitlab.com/zatoshi/iptvplayer-for-e2 | Python | 337 lines
85 for catItem in catsData: 86 tmp = re.compile('<a[^>]*?href="([^"]+?)"[^>]*?>([^<]+?)<').findall(catItem) 87 for item in tmp: 96 data = self.cm.ph.getDataBeetwenMarkers(data, '<div class="menu-main-menu', '</div>')[1] 97 data = re.compile('<a[^>]*?href="([^"]+?)"[^>]*?>([^<]+?)<').findall(data) 98 prevUrl = '' 174 if len(data): del data[0] 175 re_links = re.compile('<a[^>]+?href="([^"]+?)"[^>]*?>([^<]+?)</a>') 176 for item in data:flags.py https://gitlab.com/JFT/Irrlicht_extended | Python | 379 lines
50 spirv_args = ['--help'] 51 expected_stdout = re.compile(r'.*The SPIR-V binary is read from <input>') 52swift-recon.py https://gitlab.com/d34dh0r53/rpc-openstack | Python | 389 lines
89 \s+reported:\s+(?P<reported>\d+)""" 90 return re.compile('\[' + data + '\]' + expression, re.VERBOSE) 91 117 :param parsed_by: Compiled regular expression to match and parse with 118 :type parsed_by: _sre.SRE_Pattern (the result of calling re.compile) 119 :returns: list of dictionaries of parse data 263 """ 264 check_re = re.compile('Checking\s+(?P<check>[^\s]+)\s+md5sums?') 265 error_re = re.compile('https?://(?P<address>[^:]+):\d+') 265 error_re = re.compile('https?://(?P<address>[^:]+):\d+') 266 result_re = re.compile( 267 '(?P<success>\d+)/(?P<total>\d+)[^\d]+(?P<errors>\d+).*'version.py https://gitlab.com/technomancer7/aos | Python | 363 lines
149 150 version_re = re.compile(r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', 151 re.VERBOSE | re.ASCII) 322 323 component_re = re.compile(r'(\d+ | [a-z]+ | \.)', re.VERBOSE) 324player.py https://gitlab.com/alidzapp/mps-youtube | Python | 299 lines
155 # pylint: disable=R0914, R0912 156 re_mplayer = re.compile(r"A:\s*(?P<elapsed_s>\d+)\.\d\s*") 157 re_mpv = re.compile(r".{,15}AV?:\s*(\d\d):(\d\d):(\d\d)") 157 re_mpv = re.compile(r".{,15}AV?:\s*(\d\d):(\d\d):(\d\d)") 158 re_volume = re.compile(r"Volume:\s*(?P<volume>\d+)\s*%") 159 re_player = re_mpv if mpv else re_mplayerhosthdprofili.py https://gitlab.com/mustinet/iptvplayer-for-e2 | Python | 311 lines
94 data = self.cm.ph.getDataBeetwenMarkers(data, '<p class="blog-category-list">', '</p>', False)[1] 95 data = re.compile('<a[^<]+?href="([^"]+?)"[^<]*?>([^<]+?)</a>').findall(data) 96 for item in data: 168 if not sts: return [] 169 playerUrlTab = re.compile('''<iframe[^>]+?src=["']([^"^']+?)["']''', re.IGNORECASE).findall(data) 170 for url in playerUrlTab:blog.py https://gitlab.com/chuxz777/mongodb-101 | Python | 332 lines
156 # substitute some <p> for the paragraph breaks 157 newline = re.compile('\r?\n') 158 formatted_post = newline.sub("<p>", escaped_post) 278 279 whitespace = re.compile('\s') 280 295def validate_signup(username, password, verify, email, errors): 296 USER_RE = re.compile(r"^[a-zA-Z0-9_-]{3,20}$") 297 PASS_RE = re.compile(r"^.{3,20}$") 297 PASS_RE = re.compile(r"^.{3,20}$") 298 EMAIL_RE = re.compile(r"^[\S]+@[\S]+\.[\S]+$") 299htmlformatters.py https://gitlab.com/freedmpure/robotframework | Python | 302 lines
21 _image_exts = ('.jpg', '.jpeg', '.png', '.gif', '.bmp') 22 _link = re.compile('\[(.+?\|.*?)\]') 23 _url = re.compile(''' 74 newline = '\n' 75 _bold = re.compile(''' 76( # prefix (group 1) 87''', re.VERBOSE) 88 _italic = re.compile(''' 89( (^|\ ) ["'(]* ) # begin of line or space and opt. any char "'( 94''', re.VERBOSE) 95 _code = re.compile(''' 96( (^|\ ) ["'(]* ) # same as above with _ changed to `` 203class RulerFormatter(_SingleLineFormatter): 204 match = re.compile('^-{3,}$').match 205hoststreamcomplet.py https://gitlab.com/zatoshi/iptvplayer-for-e2 | Python | 344 lines
90 91 data = re.compile('<a href="([^"]+?)"[^>]*?>([^<]+?)<').findall(data) 92 for item in data:text.py https://gitlab.com/gregtyka/frankenserver | Python | 204 lines
53 # Set up regular expressions 54 re_words = re.compile(r'&.*?;|<.*?>|([A-Za-z0-9][\w-]*)') 55 re_tag = re.compile(r'<(/)?([^ ]+?)(?: (/)| .*?)?>') 139 text = text.lower() 140 capsRE = re.compile(r'(?:^|(?<=[\.\?\!] ))([a-z])') 141 text = capsRE.sub(lambda x: x.group(1).upper(), text) 142# for capword in capwords: 143# capwordRE = re.compile(r'\b%s\b' % capword, re.I) 144# text = capwordRE.sub(capword, text) 148 "Converts a phone number with letters into its numeric equivalent." 149 letters = re.compile(r'[A-PR-Y]', re.I) 150 char2number = lambda m: {'a': '2', 'c': '2', 'b': '2', 'e': '3', 166 167ustring_re = re.compile(u"([\u0080-\uffff])") 168utils.py https://gitlab.com/abhi1tb/build | Python | 376 lines
47 48specialsre = re.compile(r'[][\\()<>@,:;".]') 49escapesre = re.compile(r'[\\"]') 253 254rfc2231_continuation = re.compile(r'^(?P<name>\w+)\*((?P<num>[0-9]+)\*?)?$', 255 re.ASCII)scrub.py https://gitlab.com/mailman/django-mailman3 | Python | 284 lines
28# Path characters for common platforms 29PRE = re.compile(r'[/\\:]') 30# All other characters to strip out of Content-Disposition: filenames 31# (essentially anything that isn't an alphanum, dot, dash, or underscore). 32SRE = re.compile(r'[^-\w.]') 33# Regexp to strip out leading dots 33# Regexp to strip out leading dots 34DRE = re.compile(r'^\.*') 35 35 36NEXT_PART = re.compile(r'--------------[ ]next[ ]part[ ]--------------\n') 37gchelpers.py https://gitlab.com/abushoeb/gc-v1 | Python | 539 lines
147 cmd = "ps axo pid,command" 148 ps_re = re.compile(".*" + process_name + ".*") 149 out, err = execute_remote_command_sync(host, USERNAME, cmd)FeExtractStats.py https://gitlab.com/michaelchin/FeStat | Python | 173 lines
12charMsPattern = "\n" + patternBase % r"(?:()|(\d)|.*(-\d).*)" 13charMsPat = re.compile( namePattern + "\n" + 14 "\n".join( [ classPattern for i in range( NUM_STATS - 1 ) ] ) ) 14 "\n".join( [ classPattern for i in range( NUM_STATS - 1 ) ] ) ) 15charBsPat = re.compile( namePattern + "\n" + classPattern + 16 "".join( [ statPattern for i in range( NUM_STATS + 1 ) ] ) ) 16 "".join( [ statPattern for i in range( NUM_STATS + 1 ) ] ) ) 17grPat = re.compile( namePattern + "".join( [ statPattern for i in range( NUM_STATS ) ] ) ) 18# FeClasses require slightly different patterns due to extra formatting in some cases 20feClassStatPattern = "\n" + r"<td.*>(\d*)</td>" 21classPat = re.compile( feClassNamePattern + 22 "".join( [ feClassStatPattern for i in range( NUM_STATS ) ] ) ) 133# process that out. numRe use is explained below... 134negRe = re.compile( r"(-\d)" ) 135numRe = re.compile( r"(\d)" )introspection.py https://gitlab.com/suyesh/Djangotest | Python | 260 lines
6 7field_size_re = re.compile(r'^\s*(?:var)?char\s*\(\s*(\d+)\s*\)\s*$') 8edit.py https://gitlab.com/suyesh/Djangotest | Python | 334 lines
15 16PERCENT_PLACEHOLDER_REGEX = re.compile(r'%\([^\)]+\)') # RemovedInDjango110Warning 17design_analysis.py https://gitlab.com/vim-IDE/python-mode | Python | 331 lines
27# regexp for ignored argument name 28IGNORED_ARGUMENT_NAMES = re.compile('_.*') 29nailgun_executor.py https://gitlab.com/Ivy001/pants | Python | 286 lines
69 # 'NGServer 0.9.1 started on 127.0.0.1, port 53785.' 70 _NG_PORT_REGEX = re.compile(r'.*\s+port\s+(\d+)\.$') 71views.py https://gitlab.com/cyrilbrulebois/ishtar | Python | 261 lines
46 47RE_YEAR_INDEX = re.compile(r"([1-2][0-9]{3})-([0-9]+)") # eg.: 2014-123 48check_eqns.py https://gitlab.com/RolfSander/caaba-mecca | Python | 272 lines
76 EQNFILE = open(eqnfilename, 'r', encoding='utf-8') 77 regexp = re.compile('^<(.*)>(.*)=(.*):(.*);(.*)$') 78 for line0 in iter(EQNFILE): # loop over *.eqn fileoptik_ext.py https://gitlab.com/holtscomm/gae-purchase-order-system | Python | 397 lines
23 * regexp 24 argument of this type will be converted using re.compile 25 * csv 79 try: 80 return re.compile(value) 81 except ValueError:widgets.py https://gitlab.com/kreativedev/django-oscar | Python | 344 lines
117 # Create a regular expression from the dictionary keys 118 regex = re.compile("(%s)" % "|".join(map(re.escape, dict.keys()))) 119trafficshaper.py https://gitlab.com/jonnialva90/iridium-browser | Python | 186 lines
50 51 _BANDWIDTH_RE = re.compile(BANDWIDTH_PATTERN) 52local_device_instrumentation_test_run.py https://gitlab.com/jonnialva90/iridium-browser | Python | 194 lines
43 44_CURRENT_FOCUS_CRASH_RE = re.compile( 45 r'\s*mCurrentFocus.*Application (Error|Not Responding): (\S+)}')PRESUBMIT.py https://gitlab.com/0072016/Facebook-SDK- | Python | 291 lines
18def _CheckForVersionControlConflictsInFile(input_api, f): 19 pattern = input_api.re.compile('^(?:<<<<<<<|>>>>>>>) |^=======$') 20 errors = [] 117 # Files that follow Chromium's coding style do not include capital letters. 118 re_chromium_style_file = re.compile(r'\b[a-z_]+\.(cc|h)$') 119 style_checker_path = input_api.os_path.join(input_api.PresubmitLocalPath(), 145 build breakage.""" 146 os_macro_re = input_api.re.compile(r'^\s*#(el)?if.*\bOS_') 147 errors = input_api.canned_checks._FindNewViolationsOfRule( 159 debug output.""" 160 printf_re = input_api.re.compile(r'^\s*(printf\(|fprintf\(stderr,)') 161 errors = input_api.canned_checks._FindNewViolationsOfRule( 173def _CheckForFailInFile(input_api, f): 174 pattern = input_api.re.compile('^FAIL') 175 errors = []__init__.py https://gitlab.com/pbandark/sos | Python | 459 lines
77 """ 78 reg = re.compile(regex_name, flags) 79 return [pkg for pkg in self.all_pkgs().keys() if reg.match(pkg)]feat_io.py https://gitlab.com/github-cloud-corporation/mxnet | Python | 394 lines
81 for i in xrange(len(lines)): 82 pair = re.compile("\s+").split(lines[i]) 83 if len(pair) != 2:cros_list_buildbot_crashes.py https://gitlab.com/github-cloud-corporation/chromite | Python | 261 lines
32 33 CRASH_PATTERN = re.compile(r'/([^/.]*)\.(\d+)[^/]*\.dmp\.txt$') 34 STACK_TRACE_PATTERN = re.compile(r'Thread 0 ((?:[^\n]+\n)*)') 34 STACK_TRACE_PATTERN = re.compile(r'Thread 0 ((?:[^\n]+\n)*)') 35 FUNCTION_PATTERN = re.compile(r'\S+!\S+') 36assertsql.py https://gitlab.com/abhi1tb/build | Python | 419 lines
198 SQLMatchRule.__init__(self) 199 self.regex = re.compile(regex) 200 self.orig_regex = regexincluder.py https://gitlab.com/gregtyka/frankenserver | Python | 473 lines
177 self.mode = None 178 self.__include_pattern = re.compile(include_regex) 179 self.__name = nameedify_generator.py https://gitlab.com/brian0218/rk3066_r-box_android4.2.2_sdk | Python | 280 lines
46 first = True 47 x = re.compile("^(.{,%d})\0" % (linelen-indent,)) 48 while True:lint.py https://gitlab.com/dj-tech/fdroidserver | Python | 432 lines
32def enforce_https(domain): 33 return (re.compile(r'.*[^sS]://[^/]*' + re.escape(domain) + r'(/.*)?'), 34 domain + " URLs should always use https://") 46def forbid_shortener(domain): 47 return (re.compile(r'https?://[^/]*' + re.escape(domain) + r'/.*'), 48 "URL shorteners should not be used") 56http_checks = https_enforcings + http_url_shorteners + [ 57 (re.compile(r'.*github\.com/[^/]+/[^/]+\.git'), 58 "Appending .git is not necessary"), 58 "Appending .git is not necessary"), 59 (re.compile(r'.*://[^/]*(github|gitlab|bitbucket|rawgit)[^/]*/([^/]+/){1,3}master'), 60 "Use /HEAD instead of /master to point at a file in the default branch"), 67 'Issue Tracker': http_checks + [ 68 (re.compile(r'.*github\.com/[^/]+/[^/]+/*$'), 69 "/issues is missing"),base.py https://github.com/kvbik/django.git | Python | 326 lines
61# http://dev.mysql.com/doc/refman/5.0/en/news.html . 62server_version_re = re.compile(r'(\d{1,2})\.(\d{1,2})\.(\d{1,2})') 63base.py https://gitlab.com/gregtyka/frankenserver | Python | 265 lines
15# Regular expressions for recognizing the GeoIP free database editions. 16free_regex = re.compile(r'^GEO-\d{3}FREE') 17lite_regex = re.compile(r'^GEO-\d{3}LITE')core.py https://gitlab.com/phongphans61/machine-learning-tictactoe | Python | 396 lines
9_alabel_prefix = b'xn--' 10_unicode_dots_re = re.compile('[\u002e\u3002\uff0e\uff61]') 11stegaref.py https://gitlab.com/surajraghuvanshi/Privlage-Esclator | Python | 374 lines
42 # init regexp for the returning data 43 self.re_response = re.compile( 44 "<%s>(.*)</%s>" % 47 :8]), re.DOTALL) 48 self.re_debug = re.compile( 49 "<%sDEBUG>(.*?)</%sDEBUG>" %convert-ly.py https://gitlab.com/aguai/lilypond | Python | 367 lines
39lilypond_version_re_str = '\\\\version *\"([0-9.]+)"' 40lilypond_version_re = re.compile (lilypond_version_re_str) 41 42lilypond_version_strict_re_str = '\\\\version *\"([0-9]+[.][0-9]+[.][0-9]+)"' 43lilypond_version_strict_re = re.compile (lilypond_version_strict_re_str) 44v8_suppressions.py https://gitlab.com/jbergstroem/node.js | Python | 347 lines
33# For ignoring lines before carets and to ignore caret positions. 34CARET_RE = re.compile(r'^\s*\^\s*$') 35 88# 'crbug.com/666308': 89# re.compile(r'.*End stripped down and modified version.*' 90# r'\.prototype.*instanceof.*.*', re.S) 106 'crbug.com/664068': 107 re.compile(r'RangeError(?!: byte length)', re.S), 108 'crbug.com/667678': 108 'crbug.com/667678': 109 re.compile(r'\[native code\]', re.S), 110 'crbug.com/681806': 110 'crbug.com/681806': 111 re.compile(r'WebAssembly\.Instance', re.S), 112 'crbug.com/681088':apache.py https://gitlab.com/0072016/letsencrypt | Python | 306 lines
39# Keywords likely to be found in filenames of sensitive files 40_SENSITIVE_FILENAME_REGEX = re.compile(r"^(?!.*proxy_fdpass).*pass.*$|private|" 41 r"secret|cert|crt|key|rsa|dsa|pw|\.pem|"sandbox.py https://gitlab.com/Alioth-Project/clang-r445002 | Python | 492 lines
214 """ 215 pattern = re.compile(r'(setuptools|pkg_resources|distutils|Cython)(\.|$)') 216 return bool(pattern.match(mod_name))ansi_code_processor.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 378 lines
49 (CSI_SUBPATTERN, OSC_SUBPATTERN)) 50ANSI_OR_SPECIAL_PATTERN = re.compile('(\a|\b|\r(?!\n)|\r?\n)|(?:%s)' % ANSI_PATTERN) 51SPECIAL_PATTERN = re.compile('([\f])')