100+ results results for 're.compile repo:hexdump42/pypy-benchmarks' (2153 ms)
13import org.eclipse.jdt.core.Signature; 14import org.eclipse.jdt.core.compiler.*; 15import org.eclipse.jdt.internal.compiler.ExtraFlags;decoder.py https://gitlab.com/gregtyka/server | 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'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| ?)*){1,}/'),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-,]+")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 path4hostmototube_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.*;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 33html_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])win_tool.py https://gitlab.com/KongMono/GuitarChord | Python | 314 lines
23# link.exe. 24_LINK_EXE_OUT_ARG = re.compile('/OUT:(?P<out>.+)$', re.IGNORECASE) 25download.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+))?') 38VariablesEvaluator.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;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;app.py https://gitlab.com/mathiasljungberg/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+)') 110csrf.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) 20BinaryMember.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;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);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':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; 39CreatePackageFragmentOperation.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);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;toc.py https://gitlab.com/edmcouncil/schemaorg | Python | 310 lines
31 32IDCOUNT_RE = re.compile(r'^(.*)_([0-9]+)$') 33 139 140 self.header_rgx = re.compile("[Hh][123456]") 141CompletionRequestor.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 358 lines
12 13import org.eclipse.jdt.core.compiler.IProblem; 14printing.py https://gitlab.com/infected_/linaro_aarch64-linux-android-5.3.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(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.*;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) 68vintage_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)Checker.py https://gitlab.com/darick.jarvis/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 TrueCompletionRequestor.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 305 lines
12 13import org.aspectj.org.eclipse.jdt.core.compiler.IProblem; 14sort_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 = {gcycsbplot.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")StatementAnalyzer.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 277 lines
25import org.eclipse.jdt.core.SourceRange; 26import org.eclipse.jdt.core.compiler.IScanner; 27import org.eclipse.jdt.core.dom.ASTNode;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',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]') 11wininst2wheel.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)ReconcileWorkingCopyOperation.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 275 lines
20import org.eclipse.jdt.core.*; 21import org.eclipse.jdt.core.compiler.CategorizedProblem; 22import org.eclipse.jdt.core.compiler.CompilationParticipant; 22import org.eclipse.jdt.core.compiler.CompilationParticipant; 23import org.eclipse.jdt.core.compiler.ReconcileContext; 24import org.eclipse.jdt.core.dom.AST;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_]+') 25hostfighttube.py https://gitlab.com/zatoshi/iptvplayer-for-e2 | Python | 338 lines
94 return 95 match = re.compile("<a href='([^']+?)' class='level0'[^>]+?>([^<]+?)</a>").findall(data) 96 if len(match) > 0: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:JUnitQuickFixProcessor.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 348 lines
47import org.eclipse.jdt.core.JavaModelException; 48import org.eclipse.jdt.core.compiler.IProblem; 49import org.eclipse.jdt.core.dom.ASTNode;HTMLParser.py https://gitlab.com/Teo-Mirror/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:_]*')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_'quoprimime.py https://gitlab.com/Mirros/XX-net | Python | 336 lines
56 57hqre = re.compile(r'[^-a-zA-Z0-9!*+/ ]') 58bqre = re.compile(r'[^ !-<>-~\t]')text.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>') 52blog.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]+$") 299hoststreamcomplet.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])") 168gchelpers.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('_.*') 29AbstractCompilationEnv.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 360 lines
38import org.eclipse.jdt.core.JavaCore; 39import org.eclipse.jdt.core.compiler.BuildContext; 40import org.eclipse.jdt.core.compiler.CategorizedProblem; 40import org.eclipse.jdt.core.compiler.CategorizedProblem; 41import org.eclipse.jdt.core.compiler.ReconcileContext; 42import org.eclipse.jdt.core.dom.ASTRequestor; 322 Map<String, String> options = getJavaProject().getOptions(true); 323 String sourceLevel = options.get(JavaCore.COMPILER_SOURCE); 324 String complianceLevel = options.get(JavaCore.COMPILER_COMPLIANCE);views.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 fileJavaBuildConfigurationBlock.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 328 lines
49 50 private static final Key PREF_PB_MAX_PER_UNIT= getJDTCoreKey(JavaCore.COMPILER_PB_MAX_PER_UNIT); 51optik_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:trafficshaper.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 = []tmxr200x.py https://gitlab.com/jjmaldonis/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 elementsldif.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) 68CodeStyleCleanUp.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 247 lines
21import org.eclipse.jdt.core.JavaCore; 22import org.eclipse.jdt.core.compiler.IProblem; 23import org.eclipse.jdt.core.dom.CompilationUnit; 108 if (isEnabled(CleanUpConstants.MEMBER_ACCESSES_STATIC_QUALIFY_WITH_DECLARING_CLASS) && isEnabled(CleanUpConstants.MEMBER_ACCESSES_STATIC_QUALIFY_WITH_DECLARING_CLASS_INSTANCE_ACCESS)) 109 result.put(JavaCore.COMPILER_PB_STATIC_ACCESS_RECEIVER, JavaCore.WARNING); 110 if (isEnabled(CleanUpConstants.MEMBER_ACCESSES_STATIC_QUALIFY_WITH_DECLARING_CLASS) && isEnabled(CleanUpConstants.MEMBER_ACCESSES_STATIC_QUALIFY_WITH_DECLARING_CLASS_SUBTYPE_ACCESS)) 110 if (isEnabled(CleanUpConstants.MEMBER_ACCESSES_STATIC_QUALIFY_WITH_DECLARING_CLASS) && isEnabled(CleanUpConstants.MEMBER_ACCESSES_STATIC_QUALIFY_WITH_DECLARING_CLASS_SUBTYPE_ACCESS)) 111 result.put(JavaCore.COMPILER_PB_INDIRECT_STATIC_ACCESS, JavaCore.WARNING); 112 return result;default.jasperreports.properties https://gitlab.com/essere.lab.public/qualitas.class-corpus | Properties File | 190 lines
8net.sf.jasperreports.compiler.javascript=net.sf.jasperreports.compilers.JavaScriptCompiler 9org.eclipse.jdt.core.compiler.source=1.5 10org.eclipse.jdt.core.compiler.compliance=1.5 10org.eclipse.jdt.core.compiler.compliance=1.5 11org.eclipse.jdt.core.compiler.codegen.TargetPlatform=1.5 12includer.py https://gitlab.com/gregtyka/frankenserver | Python | 473 lines
177 self.mode = None 178 self.__include_pattern = re.compile(include_regex) 179 self.__name = namebase.py https://gitlab.com/gregtyka/ka-lite | 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')swift-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+).*'htmlformatters.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 205convert-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) 44teepty.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')version.py https://gitlab.com/unofficial-mirrors/cpython | Python | 343 lines
129 130 version_re = re.compile(r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', 131 re.VERBOSE | re.ASCII) 299 300 component_re = re.compile(r'(\d+ | [a-z]+ | \.)', re.VERBOSE) 301CompilationUnitProblemFinder.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 279 lines
18import org.eclipse.jdt.core.*; 19import org.eclipse.jdt.core.compiler.CategorizedProblem; 20import org.eclipse.jdt.internal.compiler.*; 105 IJavaProject project = ((SourceTypeElementInfo) sourceTypes[0]).getHandle().getJavaProject(); 106 this.options.complianceLevel = CompilerOptions.versionToJdkLevel(project.getOption(JavaCore.COMPILER_COMPLIANCE, true)); 107 this.options.sourceLevel = CompilerOptions.versionToJdkLevel(project.getOption(JavaCore.COMPILER_SOURCE, true));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|"check-style.py https://gitlab.com/pmaddi/cs433 | Python | 439 lines
222def parse_patchset(generator): 223 src_file = re.compile('^--- (.*)$') 224 dst_file = re.compile('^\+\+\+ (.*)$') 224 dst_file = re.compile('^\+\+\+ (.*)$') 225 chunk_start = re.compile('^@@ -([0-9]+),([0-9]+) \+([0-9]+),([0-9]+) @@') 226 src = re.compile('^-(.*)$') 226 src = re.compile('^-(.*)$') 227 dst = re.compile('^\+(.*)$') 228 both = re.compile('^ (.*)$') 268def remove_trailing_whitespace_changes(patch_generator): 269 whitespace = re.compile('^(.*)([ \t]+)$') 270 patchset = parse_patchset(patch_generator)lastchange.py https://gitlab.com/jonnialva90/iridium-browser | Python | 316 lines
15 16_GIT_SVN_ID_REGEX = re.compile(r'.*git-svn-id:\s*([^@]*)@([0-9]+)', re.DOTALL) 17 176 """ 177 svn_url_regex = re.compile( 178 r'.*/(' + directory_regex_prior_to_src_url + r')(/.*)')hostpinkbike.py https://gitlab.com/zatoshi/iptvplayer-for-e2 | Python | 291 lines
71 bestData = self.cm.ph.getDataBeetwenMarkers(data, 'Best Pinkbike Videos', '</div>', False)[1] 72 bestData = re.compile('href="([^"]+?)"[^>]*?>([^<]+?)</a>').findall(bestData) 73 for item in bestData: self.best.append({'url':item[0], 'title':item[1]}) 84 catItems = [] 85 tmp = re.compile('<td>(.+?)</td>').findall(item) 86 for cat in tmp: 164 data = self.cm.ph.getDataBeetwenMarkers(data, '<video', '</video>', False)[1].replace('\\"', '"') 165 data = re.compile('data-quality="([^"]+?)"[^>]+?src="([^"]+?)"').findall(data) 166 for item in data: urlTab.append({'name':item[0], 'url':item[1]})hostkabarety.py https://gitlab.com/zatoshi/iptvplayer-for-e2 | Python | 345 lines
82 83 match = re.compile('<b>Kategorie</a><br><br>(.+?)<br><br>', re.DOTALL).findall(data) 84 if len(match) > 0: 84 if len(match) > 0: 85 match2 = re.compile('href="(.+?)">(.+?)</a>').findall(match[0]) 86 if len(match2) > 0: 101 link = data.replace('\n', '') #MOD 102 match = re.compile('<a class="video-mini" title="(.+?)" href=".+?">.+?<span class="duration".+?<img class="video-mini-img".+?src="http://i.ytimg.com/vi/(.+?)/0.jpg" />').findall(link) 103 if len(match) > 0: 108 self.currList.append(item) 109 match = re.compile('<span><a href=".+?" class="next shadow-main">»</a></span>').findall(data) 110 if len(match) > 0:text.py https://gitlab.com/gregtyka/ka-lite | Python | 428 lines
25# Set up regular expressions 26re_words = re.compile(r'&.*?;|<.*?>|(\w[\w-]*)', re.U|re.S) 27re_tag = re.compile(r'<(/)?([^ ]+?)(?: (/)| .*?)?>', re.S) 266 text = force_text(text).lower() 267 capsRE = re.compile(r'(?:^|(?<=[\.\?\!] ))([a-z])') 268 text = capsRE.sub(lambda x: x.group(1).upper(), text) 321 322ustring_re = re.compile("([\u0080-\uffff])") 323 344# for single-quoted strings). 345smart_split_re = re.compile(r""" 346 ((?: 392 393_entity_re = re.compile(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));") 394EvaluationResult.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 232 lines
12 13import org.aspectj.org.eclipse.jdt.core.compiler.CategorizedProblem; 14_postgres_builtins.py https://gitlab.com/TurnInternational/simon | Python | 233 lines
72 dt = [] 73 re_start = re.compile(r'\s*<table id="datatype-pseudotypes-table">') 74 re_entry = re.compile(r'\s*<entry><type>([^<]+)</></entry>') 74 re_entry = re.compile(r'\s*<entry><type>([^<]+)</></entry>') 75 re_end = re.compile(r'\s*</table>') 76 107 # Line to start/end inserting 108 re_start = re.compile(r'^%s\s*=\s*\[\s*$' % constname) 109 re_end = re.compile(r'^\s*\]\s*$')compileall.py https://gitlab.com/unofficial-mirrors/cpython | Python | 295 lines
246 import re 247 args.rx = re.compile(args.rx) 248widgets.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()))) 119warning_diff.py https://gitlab.com/jonnialva90/iridium-browser | Python | 165 lines
55 56warningRe = re.compile(r"(.*)\(\d+\) : warning (C\d{4,5}): (.*)") 57warningRefLine = re.compile(r"(.*line ')\d+('.*)") 57warningRefLine = re.compile(r"(.*line ')\d+('.*)") 58warningRefLine2 = re.compile(r"(.*line )\d+(:.*)") 59validators.py https://gitlab.com/gregtyka/frankenserver | Python | 172 lines
31 if isinstance(self.regex, basestring): 32 self.regex = re.compile(regex) 33 41class URLValidator(RegexValidator): 42 regex = re.compile( 43 r'^https?://' # http:// or https:// 115 116email_re = re.compile( 117 r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom 121 122slug_re = re.compile(r'^[-\w]+$') 123validate_slug = RegexValidator(slug_re, _(u"Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens."), 'invalid') 124 125ipv4_re = re.compile(r'^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$') 126validate_ipv4_address = RegexValidator(ipv4_re, _(u'Enter a valid IPv4 address.'), 'invalid')QC_data.py https://gitlab.com/will_rowe/biodock | Python | 270 lines
104 len_dist = 'FAIL' 105 fqc_search = re.compile(r"Sequence length\\t(.*)\\t\\n") 106 fastqc_match = re.search(fqc_search, str(sample_stats["fastqc"][2])) 193 len_dist_trimmed = 'FAIL' 194 fqc_search = re.compile(r"Sequence length\\t(.*)\\t\\n") 195 fastqc2_match = re.search(fqc_search, str(sample_stats["fastqc_trimmed"][2]))split_link.py https://gitlab.com/jonnialva90/iridium-browser | Python | 420 lines
118 unresolved_regexes = [ 119 (re.compile(r' : error LNK2019: unresolved external symbol ".*" \((.*)\)' 120 r' referenced in function'), 121 False), 122 (re.compile(r' : error LNK2001: unresolved external symbol ".*" \((.*)\)$'), 123 False), 123 False), 124 (re.compile(r' : error LNK2019: unresolved external symbol (.*)' 125 r' referenced in function '), 126 True), 127 (re.compile(r' : error LNK2001: unresolved external symbol (.*)$'), 128 True),Javadoc.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 320 lines
16 17import org.eclipse.jdt.core.compiler.InvalidInputException; 18import org.eclipse.jdt.internal.compiler.parser.Scanner;storage_url.py https://gitlab.com/jonnialva90/iridium-browser | Python | 324 lines
24# Matches provider strings of the form 'gs://' 25PROVIDER_REGEX = re.compile(r'(?P<provider>[^:]*)://$') 26# Matches bucket strings of the form 'gs://bucket' 26# Matches bucket strings of the form 'gs://bucket' 27BUCKET_REGEX = re.compile(r'(?P<provider>[^:]*)://(?P<bucket>[^/]*)/{0,1}$') 28# Matches object strings of the form 'gs://bucket/obj' 28# Matches object strings of the form 'gs://bucket/obj' 29OBJECT_REGEX = re.compile( 30 r'(?P<provider>[^:]*)://(?P<bucket>[^/]*)/(?P<object>.*)') 31# Matches versioned object strings of the form 'gs://bucket/obj#1234' 32GS_GENERATION_REGEX = re.compile(r'(?P<object>.+)#(?P<generation>[0-9]+)$') 33# Matches versioned object strings of the form 's3://bucket/obj#NULL' 33# Matches versioned object strings of the form 's3://bucket/obj#NULL' 34S3_VERSION_REGEX = re.compile(r'(?P<object>.+)#(?P<version_id>.+)$') 35# Matches file strings of the form 'file://dir/filename'manager.py https://gitlab.com/zaverichintan/notebook | Python | 471 lines
29 30copy_pat = re.compile(r'\-Copy\d*\.') 31generate_lexicon.py https://gitlab.com/purdueNlp/DRaiL | Python | 369 lines
110 post = post.replace("\t", " ") 111 regex = re.compile('[%s]' % re.escape(string.punctuation)) 112 post = regex.sub(' ', post)expander.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):util.py https://gitlab.com/essere.lab.public/qualitas.class-corpus | Python | 309 lines
22reEscapeSeq = r"\\(.)?" 23reEscapeSeq = re.compile(reEscapeSeq) 24 224 log.debug('Version from hadoop command: %s' % verLine) 225 hadoopVerRegExp = re.compile("Hadoop ([0-9]+)\.([0-9]+).*") 226 verMatch = hadoopVerRegExp.match(verLine)translation.py https://gitlab.com/gregtyka/server | Python | 287 lines
105 106RE_TEMPLATE = re.compile("({{.*?}}|{%.*?%})") 107from cgi import escape 115 116RE_TAGS = re.compile("<(/?)(!|\w+)(.*?)(/?)>|\n", flags=re.DOTALL) 117RE_ATTR_TAGS = {'input' : re.compile("""(value|placeholder)=(?P<qt>\"|')(.+?)(?P=qt)"""), 117RE_ATTR_TAGS = {'input' : re.compile("""(value|placeholder)=(?P<qt>\"|')(.+?)(?P=qt)"""), 118 'textarea' : re.compile("""(value|placeholder)=(?P<qt>\"|')(.+?)(?P=qt)"""), 119 'a' : re.compile("""(title)=(?P<qt>\"|')(.+?)(?P=qt)"""), 119 'a' : re.compile("""(title)=(?P<qt>\"|')(.+?)(?P=qt)"""), 120 'img' : re.compile("""(title)=(?P<qt>\"|')(.+?)(?P=qt)"""), 121 } 121 } 122RE_LINEBREAK = re.compile("\n") 123wsgiapp.py https://gitlab.com/noc0lour/mailman | Python | 233 lines
138 if matcher.startswith('^'): 139 cre = re.compile(matcher) 140 # Search against the entire remaining path.VariablesEvaluator.java https://gitlab.com/essere.lab.public/qualitas.class-corpus | Java | 306 lines
14 15import org.aspectj.org.eclipse.jdt.core.compiler.*; 16import org.aspectj.org.eclipse.jdt.internal.compiler.ClassFile;build_perf.py https://gitlab.com/adam.lukaitis/fplutil | Python | 822 lines
44## build perf and perfhost. 45REPO_PROJECTS_RE = re.compile( 46 r'(' 67## Regular expression which matches the OSX host toolchain projects. 68REPO_PROJECTS_DARWIN_HOST_GCC_RE = re.compile( 69 r'^prebuilts/gcc/darwin-x86/host/.*') 76## check. 77MAIN_MK_JAVA_VERSION_RE = re.compile( 78 r'[^#]?ifn?eq *\(.*\$\((java_version|java_version_str|javac_version|' 81## Regular expression which matches a Android lunch (build tool) option string. 82LUNCH_OPTION_RE = re.compile(r'\s*([0-9]+)\.\s*([a-zA-Z0-9_-]+)') 83 102## Regular expression which matches API levels in BUILD_NUMBERS_URL. 103ANDROID_API_LEVEL_RE = re.compile(r'API level ([0-9]+)($|, NDK ([0-9]+))') 104android.py https://gitlab.com/adam.lukaitis/fplutil | Python | 1342 lines
67 68_MATCH_DEVICES = re.compile(r'^List of devices attached\s*') 69_MATCH_PACKAGE = re.compile(r'^package:(.*)') 69_MATCH_PACKAGE = re.compile(r'^package:(.*)') 70_GTEST_FAILED = re.compile(r'(\[\s*FAILEDs\*\]|.*FAILED TESTS)') 71android_ndk_perf.py https://gitlab.com/adam.lukaitis/fplutil | Python | 1467 lines
78HOST_SYSTEM_TO_OS_NAME = ( 79 (re.compile(r'Darwin'), 'darwin'), 80 (re.compile(r'Linux'), 'linux'), 80 (re.compile(r'Linux'), 'linux'), 81 (re.compile(r'Windows'), 'windows'), 82 (re.compile(r'CYGWIN.*'), 'windows') 163## "perf buildid-list --with-hits -i ${input_file}". 164PERF_BUILDID_LIST_MATCH_OBJ_RE = re.compile(r'^[^ ]* ([^\[][^ ]*[^\]])') 165 167## /sys/devices/system/cpu. 168SYS_DEVICES_CPU_NUMBER_RE = re.compile( 169 r'/sys/devices/system/cpu/cpu([0-9]+)/.*') 172## e.g the output of "perf script -D". 173PERF_DUMP_EVENT_SAMPLE_RE = re.compile( 174 r'^(?P<unknown>\d+)\s+'element.py https://gitlab.com/adam.lukaitis/muzei | Python | 1334 lines
9 10whitespace_re = re.compile("\s+") 11 66 67 CHARSET_RE = re.compile("((^|;)\s*charset=)([^;]*)", re.M) 68dammit.py https://gitlab.com/adam.lukaitis/muzei | Python | 829 lines
44 45xml_encoding_re = re.compile( 46 '^<\?.*encoding=[\'"](.*?)[\'"].*\?>'.encode(), re.I) 46 '^<\?.*encoding=[\'"](.*?)[\'"].*\?>'.encode(), re.I) 47html_meta_re = re.compile( 48 '<\s*meta[^>]+charset\s*=\s*["\']?([^>]*?)[ /;\'">]'.encode(), re.I) 68 re_definition = "[%s]" % "".join(characters_for_re) 69 return lookup, reverse_lookup, re.compile(re_definition) 70 (CHARACTER_TO_HTML_ENTITY, HTML_ENTITY_TO_CHARACTER, 80 81 BARE_AMPERSAND_OR_BRACKET = re.compile("([<>]|" 82 "&(?!#\d+;|#x[0-9a-fA-F]+;|\w+;)" 84 85 AMPERSAND_OR_BRACKET = re.compile("([<>&])") 86content.py https://gitlab.com/adam.lukaitis/tango-examples-c | Python | 584 lines
27# 28re_code_start = re.compile( r"(\s*){\s*$" ) 29re_code_end = re.compile( r"(\s*)}\s*$" ) 34# 35re_identifier = re.compile( r'(\w*)' ) 36 41# 42re_header_macro = re.compile( r'^#define\s{1,}(\w{1,}_H)\s{1,}<(.*)>' ) 43 227# 228re_field = re.compile( r"\s*(\w*|\w(\w|\.)*\w)\s*::" ) 229variables.py https://gitlab.com/vim-IDE/python-mode | Python | 1069 lines
36 37SPECIAL_OBJ = re.compile("^_{2}[a-z]+_{2}$") 38python3.py https://gitlab.com/vim-IDE/python-mode | Python | 581 lines
26 27_ZERO = re.compile("^0+$") 28base.py https://gitlab.com/vim-IDE/python-mode | Python | 1140 lines
52# regex for class/function/variable/constant name 53CLASS_NAME_RGX = re.compile('[A-Z_][a-zA-Z0-9]+$') 54MOD_NAME_RGX = re.compile('(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$') 54MOD_NAME_RGX = re.compile('(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$') 55CONST_NAME_RGX = re.compile('(([A-Z_][A-Z0-9_]*)|(__.*__))$') 56COMP_VAR_RGX = re.compile('[A-Za-z_][A-Za-z0-9_]*$') 56COMP_VAR_RGX = re.compile('[A-Za-z_][A-Za-z0-9_]*$') 57DEFAULT_NAME_RGX = re.compile('[a-z_][a-z0-9_]{2,30}$') 58CLASS_ATTRIBUTE_RGX = re.compile(r'([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$') 59# do not require a doc string on system methods 60NO_REQUIRED_DOC_RGX = re.compile('__.*__') 61REVERSED_METHODS = (('__getitem__', '__len__'),utils.py https://gitlab.com/vim-IDE/python-mode | Python | 924 lines
74 75OPTION_RGX = re.compile(r'\s*#.*\bpylint:(.*)') 76specifiers.py https://gitlab.com/vim-IDE/python-mode | Python | 784 lines
225 226 _regex = re.compile( 227 r""" 286 287 _regex = re.compile( 288 r"""__init__.py https://gitlab.com/vim-IDE/python-mode | Python | 1436 lines
155 def __iter__(self): 156 component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE) 157 replace = { 482 483macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)") 484darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)")rope.py https://gitlab.com/vim-IDE/python-mode | Python | 915 lines
60 61FROM_RE = re.compile(r'^\s*from\s+[\.\w\d_]+$') 62autopep8.py https://gitlab.com/vim-IDE/python-mode | Python | 1475 lines
76 77PYTHON_SHEBANG_REGEX = re.compile(r'^#!.*\bpython[23]?\b\s*$') 78exportlib.py https://gitlab.com/Aaeinstein54/specfem3d | Python | 855 lines
76 import re 77 rule_st=re.compile("(.+)_[0-9]+\.") 78 rule_ex=re.compile(".+_[0-9]+\.(.+)") 78 rule_ex=re.compile(".+_[0-9]+\.(.+)") 79 rule_int=re.compile(".+_([0-9]+)\.") 80 filenames=glob.glob(cubfiles) 237 # 238 rule_st=re.compile("(.+)_[0-9]+\.") 239 rule_ex=re.compile(".+_[0-9]+\.(.+)") 239 rule_ex=re.compile(".+_[0-9]+\.(.+)") 240 rule_int=re.compile(".+_([0-9]+)\.") 241 boundary_dict={}pcre.m https://gitlab.com/Aaeinstein54/linguist | Objective C | 511 lines
98 n erropt,ref,err,erroffset,code 99 s code=$&pcre.compile(.pattern,$g(options),.erropt,.ref,.err,.erroffset,$g(locale),$g(mlimit,0),$g(reclimit,0)) 100 s:code $ec=",U"_(-code)_","pastWeather.py https://gitlab.com/abushoeb/ghadoop-v1 | Python | 589 lines
147 148 timeRe = re.compile('<td valign="middle" class="inDentA".*<b>(.*)</b></font></td>') 149 tempRe = re.compile('<td valign="middle" align="left".*>(.+)<b>(-?\d+)°F</b></td>') 149 tempRe = re.compile('<td valign="middle" align="left".*>(.+)<b>(-?\d+)°F</b></td>') 150 feltRe = re.compile('<td align="center" valign="middle" class="blueFont10" bgcolor="#.+"><b>(\-*\d+)°F</b></td>') 151 dewpRe = re.compile('<td align="center" valign="middle" class="blueFont10" bgcolor="#.+">(\-*\d+)°F</td>') #<td align="center" valign="middle" class="blueFont10" bgcolor="#f1f4f5">30°F</td> 151 dewpRe = re.compile('<td align="center" valign="middle" class="blueFont10" bgcolor="#.+">(\-*\d+)°F</td>') #<td align="center" valign="middle" class="blueFont10" bgcolor="#f1f4f5">30°F</td> 152 humiRe = re.compile('<td align="center" valign="middle" class="blueFont10" bgcolor="#.+">(\d+)%</td>') #<td align="center" valign="middle" class="blueFont10" bgcolor="#f1f4f5">92%</td> 153 visiRe = re.compile('<td align="center" valign="middle" class="blueFont10" bgcolor="#.+">(\d+\.\d+)<BR>miles</td>') #<td align="center" valign="middle" class="blueFont10" bgcolor="#f1f4f5">9.0<BR>miles</td> 153 visiRe = re.compile('<td align="center" valign="middle" class="blueFont10" bgcolor="#.+">(\d+\.\d+)<BR>miles</td>') #<td align="center" valign="middle" class="blueFont10" bgcolor="#f1f4f5">9.0<BR>miles</td> 154 presRe = re.compile('<td align="center" valign="middle" class="blueFont10" bgcolor="#.+">(\d+\.\d+)$') #<td align="center" valign="middle" class="blueFont10" bgcolor="#f1f4f5">30.01 155 windRe = re.compile('<td align="center" valign="middle" class="blueFont10" bgcolor="#.+">(.+)</td>') #<td align="center" valign="middle" class="blueFont10" bgcolor="#f1f4f5">CALM</td>