PageRenderTime 424ms queryTime 73ms sortTime 82ms getByIdsTime 140ms findMatchingLines 31ms

100+ results results for 're.compile repo:bwesterb/pypy' (424 ms)

Not the results you expected?
breakpad_transform_rules.py https://github.com/lauraxt/socorro.git | Python | 306 lines
                    
80        # and converts it to a Pythonic syntax for later use.
                    
81        strip_parens_re = re.compile(r'\$(\()(\w+)(\))')
                    
82        convert_to_python_substitution_format_re = re.compile(r'\$(\w+)')
                    
                
flp.py https://bitbucket.org/__wp__/mb-linux-msli.git | Python | 451 lines
                    
271import re
                    
272prog = re.compile('^([^:]*): *(.*)')
                    
273
                    
                
ReconcileWorkingCopyOperation.java https://gitlab.com/unofficial-mirrors/eclipse-che | Java | 287 lines
                    
21import org.eclipse.jdt.core.WorkingCopyOwner;
                    
22import org.eclipse.jdt.core.compiler.CategorizedProblem;
                    
23import org.eclipse.jdt.core.dom.CheAST;
                    
                
scanner.py https://gitlab.com/wrafal/fdroidserver | Python | 329 lines
                    
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 drawables
                    
                
_python_console.py https://github.com/AndreasEisele/wikitrans-pootle.git | Python | 368 lines
                    
33
                    
34        self.__spaces_pattern = re.compile(r'^\s+')
                    
35        self.namespace = namespace
                    
                
controller.py https://gitlab.com/abhi1tb/build | Python | 376 lines
                    
17
                    
18URI = re.compile(r"^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?")
                    
19
                    
                
SourceIndexerRequestor.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 419 lines
                    
13import org.eclipse.jdt.core.Signature;
                    
14import org.eclipse.jdt.core.compiler.*;
                    
15import org.eclipse.jdt.internal.compiler.ExtraFlags;
                    
                
LazyJavaTypeCompletionProposal.java https://bitbucket.org/tomotaro1065/webtools.jsdt.core.git | Java | 377 lines
                    
290		if (project == null)
                    
291			processJavadoc= JavaScriptCore.ENABLED.equals(JavaScriptCore.getOption(JavaScriptCore.COMPILER_DOC_COMMENT_SUPPORT));
                    
292		else
                    
292		else
                    
293			processJavadoc= JavaScriptCore.ENABLED.equals(project.getOption(JavaScriptCore.COMPILER_DOC_COMMENT_SUPPORT, true));
                    
294		return processJavadoc;
                    
                
vboxmanage.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_4 | 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'
                    
                
add_shot.py https://bitbucket.org/bfloch/epp.git | Python | 381 lines
                    
135        # BUG? X:dir\dir instead of X:\dir\dir
                    
136        pa_frontslash = re.compile(r"(\w:)([^\\].*)$")
                    
137        self.GENFILEPATH = pa_frontslash.subn(r'\1\\\2', self.GENFILEPATH)[0]
                    
                
cache.py https://gitlab.com/themill/ftrack-python-api | Python | 579 lines
                    
97        if pattern is not None:
                    
98            pattern = re.compile(pattern)
                    
99
                    
                
assetcache.py https://github.com/etianen/django-optimizations.git | Python | 430 lines
                    
211            def do_load(type, include=(), exclude=()):
                    
212                include = [re.compile(fnmatch.translate(pattern)) for pattern in include]
                    
213                exclude = [re.compile(fnmatch.translate(pattern)) for pattern in exclude]
                    
                
check-c-globals.py https://github.com/albertz/CPython.git | Python | 446 lines
                    
19
                    
20CAPI_REGEX = re.compile(r'^ *PyAPI_DATA\([^)]*\) \W*(_?Py\w+(?:, \w+)*\w).*;.*$')
                    
21
                    
                
docscrape.py https://github.com/Hiccup/nipy.git | Python | 492 lines
                    
186    
                    
187    _name_rgx = re.compile(r"^\s*(:(?P<role>\w+):`(?P<name>[a-zA-Z0-9_.-]+)`|"
                    
188                           r" (?P<name2>[a-zA-Z0-9_.-]+))\s*", re.X)
                    
268        summary_str = " ".join([s.strip() for s in summary]).strip()
                    
269        if re.compile('^([\w., ]+=)?\s*[\w\.]+\(.*\)$').match(summary_str):
                    
270            self['Signature'] = summary_str
                    
                
aresource.py https://bitbucket.org/bootz/weblate.git | Python | 326 lines
                    
32WHITESPACE = ' \n\t' # Whitespace that we collapse
                    
33MULTIWHITESPACE = re.compile('[ \n\t]{2}')
                    
34
                    
                
html2text.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):
                    
                
win_tool.py https://gitlab.com/blocknotary/IonicInterviews | Python | 314 lines
                    
23# link.exe.
                    
24_LINK_EXE_OUT_ARG = re.compile('/OUT:(?P<out>.+)$', re.IGNORECASE)
                    
25
                    
                
AnnotationInfo.java https://github.com/juretta/bnd.git | Java | 379 lines
                    
12
                    
13import org.eclipse.jdt.core.compiler.CharOperation;
                    
14import org.eclipse.jdt.internal.compiler.ast.Annotation;
                    
                
SOAPService.py https://github.com/esmanhotto/emesene.git | Python | 312 lines
                    
53def compress_xml(xml_string):
                    
54    space_regex = [(re.compile('>\s+<'), '><'),
                    
55        (re.compile('>\s+'), '>'),
                    
55        (re.compile('>\s+'), '>'),
                    
56        (re.compile('\s+<'), '<')]
                    
57
                    
165        # Regex to find password
                    
166        self.password_regex = re.compile("<wsse:Password>.*?</wsse:Password>", re.S)
                    
167
                    
                
cmd_line.py https://bitbucket.org/rafaelmoreira/sublime-text.git | Python | 340 lines
                    
145        sign = 1
                    
146        is_num_or_sign = re.compile('^[0-9+-]')
                    
147        while self.c != EOF and is_num_or_sign.match(self.c):
                    
177        rv = ''
                    
178        r = re.compile(regex)
                    
179        while self.c != EOF and r.match(self.c):
                    
299        sign = 1
                    
300        is_num_or_sign = re.compile('^[0-9+-]')
                    
301        while self.c != EOF and is_num_or_sign.match(self.c):
                    
328        rv = ''
                    
329        r = re.compile(regex)
                    
330        while self.c != EOF and r.match(self.c):
                    
                
retrieval.py https://github.com/frankk00/openblock.git | Python | 277 lines
                    
36
                    
37license_types_re = re.compile(r'(?si)<b>\d\) License Type:</b> (?P<license_type>.*?)</td></tr><tr><td><b>\s*License Type Status:</b>  (?P<license_type_status>.*?)</td></tr><tr><td><b>\s*Status Date: </b> (?P<status_date>.*?) <b>\s*Term: (?P<term>.*?)</td></tr><tr><td><b>\s*Original Issue Date: </b> (?P<original_issue_date>.*?) <b>\s*Expiration Date: </b> (?P<expiration_date>.*?) </tr><tr><td><b>\s*Master: </b> (?P<master>.*?)\s*<b>\s*Duplicate: </b> (?P<duplicate>.*?) <b>\s*Fee Code: </b> (?P<fee_code>.*?)</td></tr>')
                    
38
                    
48    has_detail = True
                    
49    parse_detail_re = re.compile(r'(?si)License Number:  </b>.*? <b>\s*Status:  </b>(?P<status>.*?)</td></tr><tr><td><b>Primary Owner:  </b>(?P<primary_owner>.*?)</td></tr><td><b>ABC Office of Application:  </b>(?P<office_of_application>.*?)</td></tr></tr><tr><td bgcolor=#260066 class=header><font color=white> <b>Business Name </font></b></td></tr>(?P<business_name>.*?)<tr><td bgcolor=#260066 class=header><font color=white> <b>Business Address </font></b></td><td bgcolor=#260066 class=header></td></tr><tr><td><b>Address: </b>(?P<address>.*?)<b>Census Tract: </b>(?P<census_tract>.*?)</td></tr><tr><td><b>City: </b>(?P<city>.*?)     <b>County: </b>(?P<county>.*?)</td></tr><tr><td><b>State: </b>(?P<state>.*?)     <b>Zip Code: </b>(?P<zipcode>.*?)</td></tr><tr><td bgcolor=#260066 class=header><font color=white> <b>Licensee Information </font></b></td></tr><tr><td><b>Licensee: </b>.*?</td></tr><tr><td bgcolor=#260066 class=header><font color=white> <B>License Types </font></b></td></tr><tr><td>(?P<license_types>.*?)<tr><td bgcolor=#260066 class=header><font color=white> <b>Current Disciplinary Action </font>')
                    
50
                    
                
test_filelist.py https://github.com/albertz/CPython.git | Python | 340 lines
                    
139        # is a regex
                    
140        regex = re.compile('a')
                    
141        self.assertEqual(
                    
                
_fortran.py https://github.com/matthew-brett/scipy.git | Python | 444 lines
                    
86def uses_mkl(info):
                    
87    r_mkl = re.compile("mkl")
                    
88    libraries = info.get('libraries', '')
                    
                
readability.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|&nbsp;?)*){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+)')
                    
110
                    
                
etree.py https://gitlab.com/minoca/tools | Python | 337 lines
                    
11
                    
12tag_regexp = re.compile("{([^}]*)}(.*)")
                    
13
                    
                
Checker.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 True
                    
                
metadata.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]")
                    
141
                    
                
encoder.py https://github.com/ChuguluGames/mediawiki-svn.git | Python | 371 lines
                    
9
                    
10ESCAPE = re.compile(r'[\x00-\x19\\"\b\f\n\r\t]')
                    
11ESCAPE_ASCII = re.compile(r'([\\"/]|[^\ -~])')
                    
                
DSSP.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 346 lines
                    
38# Match C in DSSP
                    
39_dssp_cys=re.compile('[a-z]')
                    
40
                    
                
setup_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_]+)')
                    
60
                    
                
operations.py https://github.com/postmates/django.git | Python | 342 lines
                    
37    "For SpatiaLite Relate(<geom>, <pattern>) calls."
                    
38    pattern_regex = re.compile(r'^[012TF\*]{9}$')
                    
39    def __init__(self, pattern):
                    
53    spatialite = True
                    
54    version_regex = re.compile(r'^(?P<major>\d)\.(?P<minor1>\d)\.(?P<minor2>\d+)')
                    
55    valid_aggregates = dict([(k, None) for k in ('Extent', 'Union')])
                    
                
SideBarItem.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 path4
                    
                
test_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:
                    
                
CompilationUnitProblemFinder.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 260 lines
                    
18import org.aspectj.org.eclipse.jdt.core.*;
                    
19import org.aspectj.org.eclipse.jdt.core.compiler.CategorizedProblem;
                    
20import org.aspectj.org.eclipse.jdt.internal.compiler.*;
                    
                
tests.py https://github.com/etianen/django.git | Python | 363 lines
                    
195    (RegexValidator('[0-9]+'), '1234', None),
                    
196    (RegexValidator(re.compile('[0-9]+')), '1234', None),
                    
197    (RegexValidator('.*'), '', None),
                    
197    (RegexValidator('.*'), '', None),
                    
198    (RegexValidator(re.compile('.*')), '', None),
                    
199    (RegexValidator('.*'), 'xxxxx', None),
                    
201    (RegexValidator('x'), 'y', ValidationError),
                    
202    (RegexValidator(re.compile('x')), 'y', ValidationError),
                    
203    (RegexValidator('x', inverse_match=True), 'y', None),
                    
203    (RegexValidator('x', inverse_match=True), 'y', None),
                    
204    (RegexValidator(re.compile('x'), inverse_match=True), 'y', None),
                    
205    (RegexValidator('x', inverse_match=True), 'x', ValidationError),
                    
205    (RegexValidator('x', inverse_match=True), 'x', ValidationError),
                    
206    (RegexValidator(re.compile('x'), inverse_match=True), 'x', ValidationError),
                    
207
                    
                
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
                    
33
                    
                
js2c.py https://gitlab.com/brian0218/rk3188_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])
                    
                
escape.py https://github.com/daharon/tornado.git | Python | 327 lines
                    
62
                    
63_XHTML_ESCAPE_RE = re.compile('[&<>"]')
                    
64_XHTML_ESCAPE_DICT = {'&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;'}
                    
222# This regex should avoid those problems.
                    
223_URL_RE = re.compile(ur"""\b((?:([\w-]+):(/{1,3})|www[.])(?:(?:(?:[^\s&()]|&amp;|&quot;)*(?:[^!"#$%&'()*+,.:;<=>?@\[\]^`{|}~\s]))|(?:\((?:[^\s&()]|&amp;|&quot;)*\)))+)""")
                    
224
                    
                
base.py https://github.com/aruder77/applause.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})')
                    
63
                    
                
core.py https://github.com/junalmeida/Sick-Beard.git | Python | 387 lines
                    
9_alabel_prefix = b'xn--'
                    
10_unicode_dots_re = re.compile(u'[\u002e\u3002\uff0e\uff61]')
                    
11
                    
                
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+))?')
                    
38
                    
                
regexp.ex https://github.com/seanjensengrey/elixir.git | Elixir | 162 lines
                    
53  % Have the escape regexp pre-compiled and stored.
                    
54  { 'ok, compiled } = Erlang.re.compile("\\\\|\\{|\\[|\\(|\\)|\\]|\\}|\\.|\\?|\\*")
                    
55  @('escape_regexp, compiled)
                    
71
                    
72      { 'ok, compiled } = Erlang.re.compile(regexp_bin, parsed_options)
                    
73      @('bin: regexp_bin, 'parsed_options: parsed_options, 'compiled: compiled)
                    
                
VariablesEvaluator.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 306 lines
                    
14
                    
15import org.eclipse.jdt.core.compiler.*;
                    
16import org.eclipse.jdt.internal.compiler.ClassFile;
                    
                
manifest.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 = {
                    
                
tmxr200x.py https://bitbucket.org/alexei-matveev/ase-local.git | Python | 256 lines
                    
82        # http://stackoverflow.com/questions/647655/python-regex-split-and-special-character
                    
83        table = re.compile('(:.*:)').split(table)
                    
84        # remove empty elements
                    
                
SourceMethod.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 324 lines
                    
13import org.eclipse.jdt.core.*;
                    
14import org.eclipse.jdt.core.compiler.CharOperation;
                    
15import org.eclipse.jdt.internal.compiler.lookup.Binding;
                    
                
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'^(.*?)(\(.*\))$')
                    
58
                    
                
automarkup.py https://github.com/kvaneesh/linux.git | 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)')
                    
55
                    
                
csrf.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)
                    
20
                    
                
version.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"[\._-]")
                    
365
                    
                
config.py https://gitlab.com/pooja043/Globus_Docker_4 | Python | 284 lines
                    
21
                    
22nonascii_re = re.compile(b(r'[\x80-\xff]'))
                    
23
                    
                
BinaryMember.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 179 lines
                    
20import org.eclipse.jdt.core.JavaModelException;
                    
21import org.eclipse.jdt.core.compiler.CharOperation;
                    
22import org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation;
                    
                
sourceDatabase.py https://bitbucket.org/memmett/petsc-memmett-old.git | Python | 374 lines
                    
43  '''A SourceDB is a dictionary of file data used during the build process.'''
                    
44  includeRE = re.compile(r'^#include (<|")(?P<includeFile>.+)\1')
                    
45  isLoading = 0
                    
284    self.sourceDB  = sourceDB
                    
285    self.includeRE = re.compile(r'^#include (<|")(?P<includeFile>.+)\1')
                    
286    return
                    
361          sourceDB.logPrint('Matching regular expression '+sys.argv[3]+' over source database', 1, 'sourceDB')
                    
362          removeRE = re.compile(sys.argv[3])
                    
363          removes  = filter(removeRE.match, sourceDB.keys())
                    
                
JarPackageFragmentRoot.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 308 lines
                    
21import org.aspectj.org.eclipse.jdt.core.*;
                    
22import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
                    
23import org.aspectj.org.eclipse.jdt.internal.core.util.HashtableOfArrayToObject;
                    
238		for (int i = existingLength; i < length; i++) {
                    
239			if (Util.isValidFolderNameForPackage(pkgName[i], project.getOption(JavaCore.COMPILER_SOURCE, true), project.getOption(JavaCore.COMPILER_COMPLIANCE, true))) {
                    
240				System.arraycopy(existing, 0, existing = new String[i+1], 0, i);
                    
                
special_env_vars.py https://github.com/1000timesdead/portage-funtoo.git | Python | 176 lines
                    
109
                    
110environ_whitelist_re = re.compile(r'^(CCACHE_|DISTCC_).*')
                    
111
                    
                
egg_info.py https://github.com/xdissent/vendor.git | Python | 451 lines
                    
207        revision = 0
                    
208        urlre = re.compile('url="([^"]+)"')
                    
209        revre = re.compile('committed-rev="(\d+)"')
                    
                
microcode-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 = {}
                    
                
JavaSearchPattern.java https://github.com/vazexqi/CodingSpectator.git | Java | 452 lines
                    
19import org.eclipse.jdt.core.Signature;
                    
20import org.eclipse.jdt.core.compiler.CharOperation;
                    
21import org.eclipse.jdt.core.search.IJavaSearchConstants;
                    
                
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':
                    
                
default.py https://github.com/dpodhola/wwscc.git | Python | 375 lines
                    
19
                    
20AUTOCOMMIT_REGEXP = re.compile(r'\s*(?:UPDATE|INSERT|CREATE|DELETE|DROP|ALTER)',
                    
21                               re.I | re.UNICODE)
                    
                
appadmin.py https://github.com/goldenboy/skiheilw2p.git | Python | 408 lines
                    
161    dbname = request.args[0]
                    
162    regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>\d+)')
                    
163    if len(request.args)>1 and hasattr(db[request.args[1]],'_primarykey'):
                    
163    if len(request.args)>1 and hasattr(db[request.args[1]],'_primarykey'):
                    
164        regex = re.compile('(?P<table>\w+)\.(?P<field>\w+)=(?P<value>.+)')
                    
165    if request.vars.query:
                    
209    if form.accepts(request.vars, formname=None):
                    
210#         regex = re.compile(request.args[0] + '\.(?P<table>\w+)\.id\>0')
                    
211        regex = re.compile(request.args[0] + '\.(?P<table>\w+)\..+')
                    
                
CUPositionCompletionProcessor.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 266 lines
                    
37import org.eclipse.jdt.core.WorkingCopyOwner;
                    
38import org.eclipse.jdt.core.compiler.IProblem;
                    
39
                    
                
printing.py https://gitlab.com/UBERTC/arm-eabi-6.0-old | Python | 285 lines
                    
174            self.gen_printer = gen_printer
                    
175            self.compiled_re = re.compile(regexp)
                    
176
                    
                
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)
                    
                
highlight.py https://github.com/goldenboy/skiheilw2p.git | Python | 334 lines
                    
125        'C': (c_tokenizer, (
                    
126            ('COMMENT', re.compile(r'//.*\r?\n'),
                    
127             'color: green; font-style: italic'),
                    
127             'color: green; font-style: italic'),
                    
128            ('MULTILINECOMMENT', re.compile(r'/\*.*?\*/', re.DOTALL),
                    
129             'color: green; font-style: italic'),
                    
129             'color: green; font-style: italic'),
                    
130            ('PREPROCESSOR', re.compile(r'\s*#.*?[^\\]\s*\n',
                    
131             re.DOTALL), 'color: magenta; font-style: italic'),
                    
131             re.DOTALL), 'color: magenta; font-style: italic'),
                    
132            ('PUNC', re.compile(r'[-+*!&|^~/%\=<>\[\]{}(),.:]'),
                    
133             'font-weight: bold'),
                    
134            ('NUMBER',
                    
135             re.compile(r'0x[0-9a-fA-F]+|[+-]?\d+(\.\d+)?([eE][+-]\d+)?|\d+'),
                    
136             'color: red'),
                    
                
LsfPlugin.py https://github.com/PerilousApricot/WMCore.git | Python | 319 lines
                    
135                    jobName = "WMAgentJob"
                    
136                    regExpParser = re.compile('.*/JobCreator/JobCache/([^/]+)/[^/]+/.*')
                    
137                    match = regExpParser.match(job['cache_dir'])
                    
183                        # check for correct naming convention in PFN
                    
184                        regExpParser = re.compile('Job <([0-9]+)> is submitted to queue')
                    
185                        match = regExpParser.match(stdout)
                    
                
CreatePackageFragmentOperation.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 157 lines
                    
27import org.aspectj.org.eclipse.jdt.core.JavaModelException;
                    
28import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
                    
29import org.aspectj.org.eclipse.jdt.internal.core.util.Messages;
                    
134	IJavaProject project = parentElement.getJavaProject();
                    
135	if (this.pkgName == null || (this.pkgName.length > 0 && JavaConventions.validatePackageName(packageName, project.getOption(JavaCore.COMPILER_SOURCE, true), project.getOption(JavaCore.COMPILER_COMPLIANCE, true)).getSeverity() == IStatus.ERROR)) {
                    
136		return new JavaModelStatus(IJavaModelStatusConstants.INVALID_NAME, packageName);
                    
                
models.py https://github.com/guetux/feincms.git | Python | 399 lines
                    
133
                    
134APPLICATIONCONTENT_RE = re.compile(r'^([^/]+)/([^/]+)$')
                    
135
                    
                
base.py https://github.com/frankk00/openblock.git | Python | 331 lines
                    
25
                    
26block_re = re.compile(r'^(\d+)[-\s]+(?:blk|block)\s+(?:of\s+)?(.*)$', re.IGNORECASE)
                    
27intersection_re = re.compile(r'(?<=.) (?:and|\&|at|near|@|around|towards?|off|/|(?:just )?(?:north|south|east|west) of|(?:just )?past) (?=.)', re.IGNORECASE)
                    
27intersection_re = re.compile(r'(?<=.) (?:and|\&|at|near|@|around|towards?|off|/|(?:just )?(?:north|south|east|west) of|(?:just )?past) (?=.)', re.IGNORECASE)
                    
28# segment_re = re.compile(r'^.{1,40}?\b(?:between .{1,40}? and|from .{1,40}? to) .{1,40}?$', re.IGNORECASE) # TODO
                    
29
                    
                
buildinator_common.py https://github.com/vasi/kdelibs.git | Python | 152 lines
                    
139    Lines = GetSvnLog ( SvnUrl )
                    
140    RevisionLine = re.compile( '^r\d+\s')
                    
141    Revisions = []
                    
                
ReferenceCollection.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 252 lines
                    
13
                    
14import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
                    
15import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
                    
                
sgml.py https://github.com/noplay/scrapy.git | Python | 158 lines
                    
89
                    
90_re_type = type(re.compile("", 0))
                    
91
                    
99                 deny_extensions=None):
                    
100        self.allow_res = [x if isinstance(x, _re_type) else re.compile(x) for x in arg_to_iter(allow)]
                    
101        self.deny_res = [x if isinstance(x, _re_type) else re.compile(x) for x in arg_to_iter(deny)]
                    
                
custom_forms.py https://github.com/will-moore/openmicroscopy.git | Python | 346 lines
                    
55    def is_valid_email(self, email):
                    
56        email_pat = re.compile(
                    
57            r"(?:^|\s)[-a-z0-9_.]+@(?:[-a-z0-9]+\.)+[a-z]{2,6}(?:\s|$)",
                    
71    def is_valid_url(self, url):
                    
72        url_pat = re.compile(
                    
73            r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|'
                    
                
mklatex.py https://github.com/jcrobak/hue.git | Python | 318 lines
                    
31
                    
32replace_invalid = re.compile(r'[-_/.\s\\]').sub
                    
33replace_content = re.compile("\{[^\}]*\}").sub
                    
34
                    
35replace_epydoc_macros = re.compile(r'(,\s*amssymb|dvips\s*,\s*)').sub
                    
36replace_rst_macros = re.compile(r'(\\usepackage\{color}|\\usepackage\[[^]]*]\{hyperref})').sub
                    
129
                    
130    search_title = re.compile(r'\\title{([^}]*)}').search
                    
131    skipping = re.compile(r'(\\end{document}|\\tableofcontents)').search
                    
182
                    
183    replace_interdoc_hyperrefs = re.compile(
                    
184        r'\\href\{([^/}]+)[.]([^./}]+)\}').sub
                    
184        r'\\href\{([^/}]+)[.]([^./}]+)\}').sub
                    
185    replace_docinternal_hyperrefs = re.compile(
                    
186        r'\\href\{\\#([^}]+)\}').sub
                    
                
ImImagePlugin.py https://gitlab.com/abhi1tb/build | Python | 377 lines
                    
103
                    
104split = re.compile(br"^([A-Za-z][^:]*):[ \t]*(.*)[ \t]*$")
                    
105
                    
                
interface_gen.py https://github.com/tris-sondon/scipy.git | Python | 162 lines
                    
8    # remove comments
                    
9    comment_block_exp = re.compile(r'/\*(?:\s|.)*?\*/')
                    
10    subroutine_exp = re.compile(r'subroutine (?:\s|.)*?end subroutine.*')
                    
10    subroutine_exp = re.compile(r'subroutine (?:\s|.)*?end subroutine.*')
                    
11    function_exp = re.compile(r'function (?:\s|.)*?end function.*')
                    
12
                    
26def convert_types(interface_in,converter):
                    
27    regexp = re.compile(r'<type_convert=(.*?)>')
                    
28    interface = interface_in[:]
                    
65    #loop through the subs
                    
66    type_exp = re.compile(r'<tchar=(.*?)>')
                    
67    TYPE_EXP = re.compile(r'<TCHAR=(.*?)>')
                    
67    TYPE_EXP = re.compile(r'<TCHAR=(.*?)>')
                    
68    routine_name = re.compile(r'(subroutine|function)\s*(?P<name>\w+)\s*\(')
                    
69    interface = ''
                    
                
SBTypeCategory.i https://gitlab.com/jorjpimm/lldb | Swig | 237 lines
                    
126                    self.get_by_name_function = get_by_name_function
                    
127                    self.regex_type = type(re.compile('.'))
                    
128
                    
                
lexer.py https://github.com/hakanw/django-debug-toolbar.git | Python | 331 lines
                    
80            try:
                    
81                rex = re.compile(tdef[0], rflags).match
                    
82            except Exception, err:
                    
                
quoprimime.py https://bitbucket.org/lbesson/web-sphinx-scripts.git | Python | 336 lines
                    
56
                    
57hqre = re.compile(r'[^-a-zA-Z0-9!*+/ ]')
                    
58bqre = re.compile(r'[^ !-<>-~\t]')
                    
                
codecontext.py https://github.com/albertz/CPython.git | Python | 244 lines
                    
25
                    
26def get_spaces_firstword(codeline, c=re.compile(r"^(\s*)(\w*)")):
                    
27    "Extract the beginning whitespace and first word from codeline."
                    
                
test_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-luhn | 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:
                    
                
CompletionRequestor.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 358 lines
                    
12
                    
13import org.eclipse.jdt.core.compiler.IProblem;
                    
14
                    
                
storage.py https://github.com/gregmuellegger/django.git | Python | 290 lines
                    
64            for pattern in patterns:
                    
65                compiled = re.compile(pattern)
                    
66                self._patterns.setdefault(extension, []).append(compiled)
                    
                
plugintest.py https://github.com/mozilla/affiliates-lib.git | Python | 343 lines
                    
234    # this regexp taken from Python 2.5's doctest
                    
235    traceback_re = re.compile(r"""
                    
236        # Grab the traceback header.  Different versions of Python have
                    
253def simplify_warnings(out):
                    
254    warn_re = re.compile(r"""
                    
255        # Cut the file and line no, up to the warning name
                    
                
repr.py https://bitbucket.org/biideal/pyramid_debugtoolbar.git | Python | 300 lines
                    
34missing = object()
                    
35_paragraph_re = re.compile(r'(?:\r\n|\r|\n){2,}')
                    
36RegexType = type(_paragraph_re)
                    
148        return text_(
                    
149            're.compile(<span class="string regex">%s</span>)' % pattern)
                    
150
                    
                
mailboxer_list.py https://github.com/socialplanning/opencore-listen.git | Python | 303 lines
                    
28# A REGEX for messages containing mail-commands
                    
29mail_command_re = re.compile('\(mail-command:([A-Za-z_-]+)',
                    
30                             re.IGNORECASE)
                    
                
search.py https://github.com/kazcw/miro.git | Python | 286 lines
                    
41# XXX not correct as we don't take into account of foreign quotation marks
                    
42QUOTEKILLER = re.compile(r'(?<!\\)"')
                    
43SLASHKILLER = re.compile(r'\\.')
                    
44# Let's hope all this stuff is in Unicode...
                    
45WORDMATCHER = re.compile("\w+", re.UNICODE)
                    
46NGRAM_MIN = 3
                    
                
ElementPath.py https://gitlab.com/envieidoc/Clover | Python | 303 lines
                    
60
                    
61xpath_tokenizer_re = re.compile(
                    
62    "("
                    
                
test_checks.py https://github.com/openstack/neutron.git | Python | 287 lines
                    
23
                    
24CREATE_DUMMY_MATCH_OBJECT = re.compile('a')
                    
25
                    
                
models.py https://github.com/LittleForker/django-minishop.git | Python | 317 lines
                    
26
                    
27SHA1_RE = re.compile('^[a-f0-9]{40}$')
                    
28
                    
                
ClassFileMatchLocator.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 279 lines
                    
14import org.aspectj.org.eclipse.jdt.core.*;
                    
15import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
                    
16import org.aspectj.org.eclipse.jdt.core.search.*;
                    
                
tvnamer.py https://bitbucket.org/fyelles/sick-beard.git | Python | 340 lines
                    
52	# foo_[s01]_[e01]_[e02]
                    
53	(re.compile('''^(.+?)[ \._\-]\[[Ss](\d+)\]((?:_\[[Ee]\d+\])+)[^\\/]*$'''),
                    
54	 re.compile('''_\[[Ee](\d+)\]''')),
                    
55	# foo.1x09x10 or foo.1x09-10
                    
56	(re.compile('''^(.+?)[ \._\-]\[?([0-9]+)((?:[x-]\d+)+)[^\\/]*$'''),
                    
57	 re.compile('''[x-](\d+)''')),
                    
58	# foo.s01.e01.e02, foo.s01e01e02, foo.s01_e01_e02, etc
                    
59	(re.compile('''^(.+?)[ \._\-][Ss]([0-9]+)((?:[\.\-_ ]?[Ee]\d+)+)[^\\/]*$'''),
                    
60	 re.compile('''[\.\-_ ]?[Ee](\d+)''')),
                    
61    # foo.205 (single eps only)
                    
62    (re.compile('''^(.+)[ \._\-]([0-9]{1})([0-9]{2})[\._ -][^\\/]*$'''),
                    
63     re.compile("(\d{2})")),
                    
64    # foo.0205 (single eps only)
                    
65    (re.compile('''^(.+)[ \._\-]([0-9]{2})([0-9]{2,3})[\._ -][^\\/]*$'''),
                    
66     re.compile("(\d{2,3})"))
                    
                
 

Source

Language