PageRenderTime 367ms queryTime 22ms sortTime 3ms getByIdsTime 156ms findMatchingLines 56ms

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

Not the results you expected?
term.py https://bitbucket.org/thomaswaldmann/moin-2.0-dev/ | Python | 459 lines
                    
228            flags = flags | re.IGNORECASE
                    
229        _needle_re = re.compile(re.escape(needle), flags)
                    
230        TextRE.__init__(self, _needle_re)
                    
247            flags = flags | re.IGNORECASE
                    
248        _needle_re = re.compile('\\b' + re.escape(needle) + '\\b', flags)
                    
249        TextRE.__init__(self, _needle_re)
                    
266            flags = flags | re.IGNORECASE
                    
267        _needle_re = re.compile('\\b' + re.escape(needle), flags)
                    
268        TextRE.__init__(self, _needle_re)
                    
285            flags = flags | re.IGNORECASE
                    
286        _needle_re = re.compile(re.escape(needle) + '\\b', flags)
                    
287        TextRE.__init__(self, _needle_re)
                    
324            flags = flags | re.IGNORECASE
                    
325        _needle_re = re.compile(re.escape(needle), flags)
                    
326        NameRE.__init__(self, _needle_re)
                    
                
type.py http://hadesmem.googlecode.com/svn/trunk/ | Python | 0 lines
                    
19
                    
20__re_hyphen = re.compile ('-')
                    
21
                    
                
adapter_mediaminerorg.py https://code.google.com/p/fanficdownloader/ | Python | 238 lines
                    
92        # Find authorid and URL from... author url.
                    
93        a = soup.find('a', href=re.compile(r"/fanfic/src.php/u/\d+"))
                    
94        self.story.setMetadata('authorId',a['href'].split('/')[-1])
                    
144        # <a href="/fanfic/src.php/a/567">Ranma 1/2</a>
                    
145        for a in soup.findAll('a',href=re.compile(r"^/fanfic/src.php/a/")):
                    
146            self.story.addToList('category',a.string)
                    
149        # <a href="/fanfic/src.php/a/567">Ranma 1/2</a>
                    
150        for a in soup.findAll('a',href=re.compile(r"^/fanfic/src.php/g/")):
                    
151            self.story.addToList('genre',a.string)
                    
                
html2text.py https://code.google.com/p/fanficdownloader/ | Python | 454 lines
                    
16import urlparse
                    
17sgmllib.charref = re.compile('&#([xX]?[0-9a-fA-F]+)[^0-9a-fA-F]')
                    
18
                    
84
                    
85r_unescape = re.compile(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));")
                    
86def unescape(s):
                    
                
doc_helper.py git://github.com/msanders/autopy.git | Python | 371 lines
                    
98    # parser for this.
                    
99    get_comments.regex = re.compile(r'/\*\s*(.+?)\s*\*/', re.DOTALL)
                    
100    comments = {}
                    
131
                    
132    format_comment.needles = [(re.compile(r'\|(.+?)\|'), r'<var>\1</var>'),
                    
133                              (re.compile(r'\b(integer|double|float|char|'
                    
135                               r'<keyword>\1</keyword>\2'),
                    
136                              (re.compile(r'\b(True|False|None)\b'),
                    
137                               r'<const>\1</const>'),
                    
137                               r'<const>\1</const>'),
                    
138                              (re.compile('`(.+?)`'), r'<mono>\1</mono>'),
                    
139               (re.compile(r'\n[\t ]+'), ' '), # Extraneous whitespace
                    
139               (re.compile(r'\n[\t ]+'), ' '), # Extraneous whitespace
                    
140               (re.compile(r'^ ', re.M), '\n'), # Intentional linebreaks
                    
141                              ]
                    
                
logparser.py https://bitbucket.org/pypy/pypy/ | Python | 439 lines
                    
29    color = "(?:\x1b.*?m)?"
                    
30    r_start = re.compile(color + r"\[([0-9a-fA-F]+)\] \{([\w-]+)" + color + "$")
                    
31    r_stop  = re.compile(color + r"\[([0-9a-fA-F]+)\] ([\w-]+)\}" + color + "$")
                    
                
quoprimime.py git://github.com/IronLanguages/main.git | Python | 336 lines
                    
56
                    
57hqre = re.compile(r'[^-a-zA-Z0-9!*+/ ]')
                    
58bqre = re.compile(r'[^ !-<>-~\t]')
                    
                
qthelp.py https://bitbucket.org/birkenfeld/sphinx/ | Python | 298 lines
                    
26
                    
27_idpattern = re.compile(
                    
28    r'(?P<title>.+) (\((class in )?(?P<id>[\w\.]+)( (?P<descr>\w+))?\))$')
                    
                
HTMLParser.py git://github.com/IronLanguages/main.git | 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:_]*')
                    
                
ezt.py http://pytof.googlecode.com/svn/trunk/ | Python | 207 lines
                    
37
                    
38_re_parse = re.compile('(\[[-\w.# ]+\])|(\[\[\])')
                    
39
                    
                
Scrubber.py https://mailman.svn.sourceforge.net/svnroot/mailman | Python | 310 lines
                    
41# Path characters for common platforms
                    
42pre = re.compile(r'[/\\:]')
                    
43# All other characters to strip out of Content-Disposition: filenames
                    
44# (essentially anything that isn't an alphanum, dot, slash, or underscore.
                    
45sre = re.compile(r'[^-\w.]')
                    
46
                    
                
xbb_search.py git://github.com/biopython/biopython.git | Python | 196 lines
                    
52        self.rx_pattern = self.IUPAC2regex(pattern)
                    
53        self.rx = re.compile(self.rx_pattern)
                    
54
                    
                
profile.py https://bitbucket.org/bbangert/dozer/ | Python | 340 lines
                    
36        self.profile_path = profile_path
                    
37        self.ignored_paths = map(re.compile, ignored_paths)
                    
38        tmpl_dir = os.path.join(here_dir, 'templates')
                    
                
ColorDelegator.py https://bitbucket.org/mirror/cpython/ | Python | 265 lines
                    
31
                    
32prog = re.compile(make_pat(), re.S)
                    
33idprog = re.compile(r"\s+(\w+)", re.S)
                    
33idprog = re.compile(r"\s+(\w+)", re.S)
                    
34asprog = re.compile(r".*?\b(as)\b")
                    
35
                    
                
eol.py https://bitbucket.org/mirror/mercurial/ | Python | 351 lines
                    
100# Matches a lone LF, i.e., one that is not part of CRLF.
                    
101singlelf = re.compile('(^|[^\r])\n')
                    
102# Matches a single EOL which can either be a CRLF where repeated CR
                    
104# stray CR is an error.
                    
105eolre = re.compile('\r*\n')
                    
106
                    
                
base.py https://bitbucket.org/mirror/django/ | Python | 322 lines
                    
37# http://dev.mysql.com/doc/refman/5.0/en/news.html .
                    
38server_version_re = re.compile(r'(\d{1,2})\.(\d{1,2})\.(\d{1,2})')
                    
39
                    
                
managers.py git://github.com/bread-and-pepper/django-userena.git | Python | 314 lines
                    
22
                    
23SHA1_RE = re.compile('^[a-f0-9]{40}$')
                    
24
                    
                
ColorDelegator.py https://bitbucket.org/pypy/pypy/ | Python | 259 lines
                    
33
                    
34prog = re.compile(make_pat(), re.S)
                    
35idprog = re.compile(r"\s+(\w+)", re.S)
                    
                
inheritance_diagram.py git://github.com/IronLanguages/main.git | Python | 366 lines
                    
54
                    
55class_sig_re = re.compile(r'''^([\w.]*\.)?    # module names
                    
56                          (\w+)  \s* $        # class/final module name
                    
                
test_fileinput.py git://github.com/IronLanguages/main.git | Python | 335 lines
                    
80    def buffer_size_test(self, t1, t2, t3, t4, bs=0, round=0):
                    
81        pat = re.compile(r'LINE (\d+) OF FILE (\d+)')
                    
82
                    
                
version.py https://bitbucket.org/mirror/cpython/ | Python | 344 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)
                    
301
                    
                
decoder.py https://bitbucket.org/arigo/cpython-withatomic/ | Python | 370 lines
                    
62
                    
63STRINGCHUNK = re.compile(r'(.*?)(["\\\x00-\x1f])', FLAGS)
                    
64BACKSLASH = {
                    
143
                    
144WHITESPACE = re.compile(r'[ \t\n\r]*', FLAGS)
                    
145WHITESPACE_STR = ' \t\n\r'
                    
                
sniff.py https://bitbucket.org/cistrome/cistrome-harvard/ | Python | 421 lines
                    
134    """
                    
135    regexp = re.compile( patt )
                    
136    fd, temp_name = tempfile.mkstemp()
                    
166    """
                    
167    regexp = re.compile( patt )
                    
168    fd, temp_name = tempfile.mkstemp()
                    
                
interface_gen.py git://github.com/scipy/scipy.git | Python | 163 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 = ''
                    
                
operations.py https://bitbucket.org/mirror/django/ | Python | 145 lines
                    
4
                    
5server_version_re = re.compile(r'PostgreSQL (\d{1,2})\.(\d{1,2})\.?(\d{1,2})?')
                    
6
                    
                
__init__.py git://github.com/biopython/biopython.git | Python | 223 lines
                    
136__regex = {
                    
137    "names": re.compile(r"Ali1:\s+(\S+)\s+Ali2:\s+(\S+)\s+"),
                    
138    "threshold": re.compile(r"Threshold of effective gap content in columns: (\S+)"),
                    
138    "threshold": re.compile(r"Threshold of effective gap content in columns: (\S+)"),
                    
139    "lengths": re.compile(
                    
140        r"length1=(\S+)\s+filtered_length1=(\S+)"
                    
142    ),
                    
143    "profilewidth": re.compile(
                    
144        r"Nseqs1=(\S+)\s+Neff1=(\S+)\s+Nseqs2=(\S+)\s+Neff2=(\S+)"
                    
145    ),
                    
146    "scores": re.compile(r"Smith-Waterman score = (\S+)\s+Evalue = (\S+)"),
                    
147    "start": re.compile(r"(\d+)"),
                    
147    "start": re.compile(r"(\d+)"),
                    
148    "align": re.compile(r"^.{15}(\S+)"),
                    
149    "positive_alignment": re.compile(r"^.{15}(.+)"),
                    
                
generate.py https://IronPython.svn.codeplex.com/svn | Python | 321 lines
                    
211        self.end = END# % name
                    
212        #self.block_pat = re.compile(PREFIX+self.start+".*?"+self.end,
                    
213        #                            re.DOTALL|re.MULTILINE)
                    
                
sites.py https://bitbucket.org/mirror/django/ | Python | 358 lines
                    
19
                    
20USER_CHANGE_PASSWORD_URL_RE = re.compile('auth/user/(\d+)/password')
                    
21
                    
                
htmlcleanup.py https://code.google.com/p/fanficdownloader/ | Python | 486 lines
                    
48    # Last expression didn't allow for 2 digit hex correctly: &#xE9;
                    
49    p = re.compile(r'&#(x[0-9a-fA-F]{,4}|[0-9]{,5})([0-9a-fA-F]*?);')
                    
50    return p.sub(_unirepl, data)
                    
54    # (or equiv), SGMLParser, entityref
                    
55    p = re.compile(r'&([a-zA-Z][-.a-zA-Z0-9]*);')
                    
56    return p.sub(r'&\1', data)
                    
                
utils.py https://bitbucket.org/mirror/cpython/ | Python | 383 lines
                    
47
                    
48specialsre = re.compile(r'[][\\()<>@,:;".]')
                    
49escapesre = re.compile(r'[\\"]')
                    
117
                    
118ecre = re.compile(r'''
                    
119  =\?                   # literal =?
                    
259
                    
260rfc2231_continuation = re.compile(r'^(?P<name>\w+)\*((?P<num>[0-9]+)\*?)?$',
                    
261    re.ASCII)
                    
                
urlresolvers.py https://bitbucket.org/mirror/django/ | Python | 298 lines
                    
77
                    
78        >>> reverse_helper(re.compile('^places/(\d+)/$'), 3)
                    
79        'places/3/'
                    
79        'places/3/'
                    
80        >>> reverse_helper(re.compile('^places/(?P<id>\d+)/$'), id=3)
                    
81        'places/3/'
                    
81        'places/3/'
                    
82        >>> reverse_helper(re.compile('^people/(?P<state>\w\w)/(\w+)/$'), 'adrian', state='il')
                    
83        'people/il/adrian/'
                    
137        # callable object (view).
                    
138        self.regex = re.compile(regex, re.UNICODE)
                    
139        if callable(callback):
                    
204        # urlconf_name is a string representing the module containing urlconfs.
                    
205        self.regex = re.compile(regex, re.UNICODE)
                    
206        self.urlconf_name = urlconf_name
                    
                
hgappext.py https://bitbucket.org/scope/dragonfly-stp-1/ | Python | 338 lines
                    
85            f.write(re.sub(
                    
86                re.compile("mercurial_revision:([^\n]*)\n"), 
                    
87                "mercurial_revision: \"%s\"\n" % revision, 
                    
                
toolset.py http://hadesmem.googlecode.com/svn/trunk/ | Python | 0 lines
                    
19
                    
20__re_split_last_segment = re.compile (r'^(.+)\.([^\.])*')
                    
21__re_two_ampersands = re.compile ('(&&)')
                    
21__re_two_ampersands = re.compile ('(&&)')
                    
22__re_first_segment = re.compile ('([^.]*).*')
                    
23__re_first_group = re.compile (r'[^.]*\.(.*)')
                    
                
default.py http://seppius-xbmc-repo.googlecode.com/svn/trunk/ | Python | 283 lines
                    
94	if http == None: return False
                    
95	r1 = re.compile('id:\s*(.[0-9]*)\s*,\s*name:\s*(.+)\s*,\s*link:\s*(.+)\s*,\s*numberOfMovies:\s*(.[0-9]*)').findall(http)
                    
96	if len(r1) == 0:
                    
114	if http == None: return False
                    
115	rows = re.compile('{(.+?)}', re.DOTALL).findall(http)
                    
116	if len(rows) == 0:
                    
119	for row in rows:
                    
120		r_title         = re.compile('title\s*:\s*(.+)\s*,').findall(row)
                    
121		r_playerLink    = re.compile("playerLink\s*:\s*'http://.+?/(.+?)'\s*,").findall(row)
                    
125			try:
                    
126				r_size             = re.compile('size\s*:\s*(.+)\s*,').findall(row)
                    
127				if len(r_size) > 0:
                    
136			try:
                    
137				r_duration         = re.compile('duration\s*:\s*(.+)\s*,').findall(row)
                    
138				if len(r_duration) > 0:     info['duration'] = r_duration[0][1:-1]
                    
                
XMCreateDB.py http://scim-python.googlecode.com/svn/trunk/ | Python | 287 lines
                    
91		_gouci = []
                    
92		patt_com = re.compile(r'^###.*')
                    
93		patt_blank = re.compile(r'^[ \t]*$')
                    
93		patt_blank = re.compile(r'^[ \t]*$')
                    
94		patt_conf = re.compile(r'.*=.*')
                    
95		patt_table = re.compile(r'(.*)\t(.*)\t.*')
                    
95		patt_table = re.compile(r'(.*)\t(.*)\t.*')
                    
96		patt_gouci = re.compile(r'.*\t.*')
                    
97		patt_s = re.compile(r'(.*)\t([\x00-\xff]{3})\t.*')
                    
123		_pinyins = []
                    
124		patt_com = re.compile(r'^#.*')
                    
125		patt_blank = re.compile(r'^[ \t]*$')
                    
125		patt_blank = re.compile(r'^[ \t]*$')
                    
126		patt_py = re.compile(r'(.*)\t(.*)\t.*')
                    
127
                    
                
AstUtil.cs http://octalforty-componento.googlecode.com/svn/trunk/ | C# | 235 lines
                    
26
                    
27using octalforty.Wizardby.Core.Compiler.Ast.Impl;
                    
28using octalforty.Wizardby.Core.SemanticModel;
                    
30
                    
31namespace octalforty.Wizardby.Core.Compiler.Ast
                    
32{
                    
                
vcfClass.py https://bitbucket.org/cistrome/cistrome-harvard/ | Python | 441 lines
                    
203# Set up and execute a regular expression match.
                    
204    recordRe = re.compile(r"^(\S+)\t(\d+)\t(\S+)\t(\S+)\t(\S+)\t(\S+)\t(\S+)\t(\S+)(\n|\t.+)$")
                    
205    #recordRe = re.compile(r"^(\S+)\s+(\d+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)(\n|\s+.+)$")
                    
                
upload.py https://bitbucket.org/cistrome/cistrome-harvard/ | Python | 364 lines
                    
46        temp = chunk
                    
47    regexp1 = re.compile( "<A\s+[^>]*HREF[^>]+>", re.I )
                    
48    regexp2 = re.compile( "<IFRAME[^>]*>", re.I )
                    
48    regexp2 = re.compile( "<IFRAME[^>]*>", re.I )
                    
49    regexp3 = re.compile( "<FRAMESET[^>]*>", re.I )
                    
50    regexp4 = re.compile( "<META[^>]*>", re.I )
                    
50    regexp4 = re.compile( "<META[^>]*>", re.I )
                    
51    regexp5 = re.compile( "<SCRIPT[^>]*>", re.I )
                    
52    lineno = 0
                    
                
sanitize_html.py https://bitbucket.org/cistrome/cistrome-harvard/ | Python | 442 lines
                    
48class _BaseHTMLProcessor(sgmllib.SGMLParser):
                    
49    special = re.compile('''[<>'"]''')
                    
50    bare_ampersand = re.compile("&(?!#\d+;|#x[0-9a-fA-F]+;|\w+;)")
                    
78    def feed(self, data):
                    
79        data = re.compile(r'<!((?!DOCTYPE|--|\[))', re.IGNORECASE).sub(r'&lt;!\1', data)
                    
80        #data = re.sub(r'<(\S+?)\s*?/>', self._shorttag_replace, data) # bug [ 1399464 ] Bad regexp for _shorttag_replace
                    
176
                    
177    _new_declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9:]*\s*').match
                    
178    def _scan_name(self, i, declstartpos):
                    
263
                    
264    valid_css_values = re.compile('^(#[0-9a-f]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|' +
                    
265      '\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$')
                    
                
__init__.py https://bitbucket.org/cistrome/cistrome-harvard/ | Python | 3261 lines
                    
80
                    
81WORKFLOW_PARAMETER_REGULAR_EXPRESSION = re.compile( '''\$\{.+?\}''' )
                    
82
                    
                
data_transfer.py https://bitbucket.org/cistrome/cistrome-harvard/ | Python | 385 lines
                    
23    check_interval = 15
                    
24    dataset_name_re = re.compile( '(dataset\d+)_(name)' )
                    
25    dataset_datatype_re = re.compile( '(dataset\d+)_(datatype)' )
                    
                
repository.py https://bitbucket.org/cistrome/cistrome-harvard/ | Python | 1360 lines
                    
25VALID_CHARS = set( string.letters + string.digits + "'\"-=_.()/+*^,:?!#[]%\\$@;{}" )
                    
26VALID_REPOSITORYNAME_RE = re.compile( "^[a-z0-9\_]+$" )
                    
27    
                    
                
controller.py https://bitbucket.org/cistrome/cistrome-harvard/ | Python | 2974 lines
                    
55
                    
56    VALID_SLUG_RE = re.compile( "^[a-z0-9\-]+$" )
                    
57    return VALID_SLUG_RE.match( slug )
                    
                
prej.py https://bitbucket.org/tortoisehg/hgtk/ | Python | 1140 lines
                    
51    # Filter patch for git information
                    
52    gitre = re.compile('diff --git a/(.*) b/(.*)')
                    
53    gitpatches = []
                    
106# @@ -start,len +start,len @@ or @@ -start +start @@ if len is 1
                    
107unidesc = re.compile('@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@')
                    
108contextdesc = re.compile('(---|\*\*\*) (\d+)(,(\d+))? (---|\*\*\*)')
                    
                
hgshelve.py https://bitbucket.org/tortoisehg/hgtk/ | Python | 658 lines
                    
25
                    
26lines_re = re.compile(r'@@ -(\d+),(\d+) \+(\d+),(\d+) @@\s*(.*)')
                    
27
                    
104class header(object):
                    
105    diff_re = re.compile('diff --git a/(.*) b/(.*)$')
                    
106    allhunks_re = re.compile('(?:index|new file|deleted file) ')
                    
106    allhunks_re = re.compile('(?:index|new file|deleted file) ')
                    
107    pretty_re = re.compile('(?:new file|deleted file) ')
                    
108    special_re = re.compile('(?:index|new file|deleted|copy|rename) ')
                    
                
test_dbtables.py git://github.com/IronLanguages/main.git | Python | 407 lines
                    
195        values = self.tdb.Select(tabname, ['b', 'a', 'd'],
                    
196            conditions={'e': re.compile('wuzzy').search,
                    
197                        'a': re.compile('^[0-9]+$').match})
                    
                
test_compare.py git://github.com/IronLanguages/main.git | Python | 447 lines
                    
221                self._test_compare_function_exception,
                    
222                re.compile('(^RuntimeError:.* naughty.*){2}', re.M|re.S)
                    
223        )
                    
239                self._test_compare_function_bad_return,
                    
240                re.compile('(^TypeError:.* return an int.*){2}', re.M|re.S)
                    
241        )
                    
404                self._test_compare_function_exception,
                    
405                re.compile('(^RuntimeError:.* naughty.*){2}', re.M|re.S)
                    
406        )
                    
422                self._test_compare_function_bad_return,
                    
423                re.compile('(^TypeError:.* return an int.*){2}', re.M|re.S)
                    
424        )
                    
                
IOBinding.py git://github.com/IronLanguages/main.git | Python | 595 lines
                    
72
                    
73coding_re = re.compile("coding[:=]\s*([-\w_.]+)")
                    
74
                    
238    eol = r"(\r\n)|\n|\r"  # \r\n (Windows), \n (UNIX), or \r (Mac)
                    
239    eol_re = re.compile(eol)
                    
240    eol_convention = os.linesep # Default
                    
                
encoder.py git://github.com/IronLanguages/main.git | Python | 448 lines
                    
13
                    
14ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]')
                    
15ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])')
                    
15ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])')
                    
16HAS_UTF8 = re.compile(r'[\x80-\xff]')
                    
17ESCAPE_DCT = {
                    
                
tokenize.py git://github.com/IronLanguages/main.git | Python | 502 lines
                    
106    re.compile, (Token, PseudoToken, Single3, Double3))
                    
107endprogs = {"'": re.compile(Single), '"': re.compile(Double),
                    
108            "'''": single3prog, '"""': double3prog,
                    
238
                    
239cookie_re = re.compile(r'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)')
                    
240blank_re = re.compile(r'^[ \t\f]*(?:[#\r\n]|$)')
                    
                
test_optparse.py git://github.com/IronLanguages/main.git | Python | 1662 lines
                    
26
                    
27retype = type(re.compile(''))
                    
28
                    
                
test_re.py git://github.com/IronLanguages/main.git | Python | 1266 lines
                    
28        s = 'QabbbcR'
                    
29        x = re.compile('ab+c')
                    
30        y = proxy(x)
                    
120        # Verify that flags do not get silently ignored with compiled patterns
                    
121        pattern = re.compile('.')
                    
122        self.assertRaises(ValueError, re.match, pattern, 'A', re.I)
                    
124        self.assertRaises(ValueError, re.findall, pattern, 'A', re.I)
                    
125        self.assertRaises(ValueError, re.compile, pattern, re.I)
                    
126
                    
128        # A regex that triggered a bug in the sre-code validator
                    
129        re.compile("(?P<quote>)(?(quote))")
                    
130
                    
186    def test_symbolic_groups(self):
                    
187        re.compile('(?P<a>x)(?P=a)(?(a)y)')
                    
188        re.compile('(?P<a1>x)(?P=a1)(?(a1)y)')
                    
                
test_strptime.py git://github.com/IronLanguages/main.git | Python | 625 lines
                    
139        # Check that compiled regex is correct
                    
140        found = self.time_re.compile(r"%A").match(self.locale_time.f_weekday[6])
                    
141        self.assertTrue(found and found.group('A') == self.locale_time.f_weekday[6],
                    
142                        "re object for '%A' failed")
                    
143        compiled = self.time_re.compile(r"%a %b")
                    
144        found = compiled.match("%s %s" % (self.locale_time.a_weekday[4],
                    
157                          'U','w','W','x','X','y','Y','Z','%'):
                    
158            compiled = self.time_re.compile("%" + directive)
                    
159            found = compiled.match(time.strftime("%" + directive))
                    
173        # Make sure a format that requires escaping of characters works
                    
174        compiled_re = self.time_re.compile("\w+ %m")
                    
175        found = compiled_re.match("\w+ 10")
                    
186        time_re = _strptime.TimeRE(locale_time)
                    
187        self.assertTrue(time_re.compile("%Z").match("Tokyo (standard time)"),
                    
188                        "locale data that contains regex metacharacters is not"
                    
                
test_tempfile.py git://github.com/IronLanguages/main.git | Python | 1093 lines
                    
42
                    
43    str_check = re.compile(r"[a-zA-Z0-9_-]{6}$")
                    
44
                    
                
test_httpservers.py git://github.com/IronLanguages/main.git | Python | 679 lines
                    
94
                    
95    HTTPResponseMatch = re.compile('HTTP/1.[0-9]+ 200 OK')
                    
96
                    
                
test_strtod.py git://github.com/IronLanguages/main.git | Python | 431 lines
                    
16
                    
17strtod_parser = re.compile(r"""    # A numeric string consists of:
                    
18    (?P<sign>[-+])?          # an optional sign, followed by
                    
                
build_ext.py git://github.com/IronLanguages/main.git | Python | 768 lines
                    
27# the same as a fully-qualified module name).
                    
28extension_name_re = re.compile \
                    
29    (r'^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$')
                    
                
util.py git://github.com/IronLanguages/main.git | Python | 477 lines
                    
94        osname = "cygwin"
                    
95        rel_re = re.compile (r'[\d.]+')
                    
96        m = rel_re.match(release)
                    
225    global _wordchars_re, _squote_re, _dquote_re
                    
226    _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
                    
227    _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'")
                    
227    _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'")
                    
228    _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"')
                    
229
                    
                
dist.py git://github.com/IronLanguages/main.git | Python | 1249 lines
                    
30# to look for a Python module named after the command.
                    
31command_re = re.compile (r'^[a-zA-Z]([a-zA-Z0-9_]*)$')
                    
32
                    
                
view.py git://github.com/IronLanguages/main.git | Python | 701 lines
                    
27
                    
28patImport=re.compile('import (?P<name>.*)')
                    
29
                    
                
mdi_pychecker.py git://github.com/IronLanguages/main.git | Python | 629 lines
                    
126#regexGrepResult=regex.compile("^\\([a-zA-Z]:.*\\)(\\([0-9]+\\))")
                    
127#regexGrep=re.compile(r"^([a-zA-Z]:[^(]*)\((\d+)\)")
                    
128regexGrep=re.compile(r"^(..[^\(:]+)?[\(:](\d+)[\):]:?\s*(.*)")
                    
                
interact.py git://github.com/IronLanguages/main.git | Python | 856 lines
                    
34# from IDLE.
                    
35_is_block_opener = re.compile(r":\s*(#.*)?$").search
                    
36_is_block_closer = re.compile(r"""
                    
                
winout.py git://github.com/IronLanguages/main.git | Python | 508 lines
                    
79	def __init__(self):
                    
80		self.patErrorMessage=re.compile('\W*File "(.*)", line ([0-9]+)')
                    
81		self.template = self.GetDocument().GetDocTemplate()
                    
                
sgrepmdi.py git://github.com/IronLanguages/main.git | Python | 527 lines
                    
117
                    
118regexGrep=re.compile(r"^([a-zA-Z]:[^(]*)\(([0-9]+)\)")
                    
119
                    
240		if self.casesensitive:
                    
241			self.pat = re.compile(self.greppattern)
                    
242		else:
                    
242		else:
                    
243			self.pat = re.compile(self.greppattern, re.IGNORECASE)
                    
244		win32ui.SetStatusText("Searching.  Please wait...", 0)
                    
                
PyParse.py git://github.com/IronLanguages/main.git | Python | 568 lines
                    
13
                    
14_synchre = re.compile(r"""
                    
15    ^
                    
37
                    
38_junkre = re.compile(r"""
                    
39    [ \t]*
                    
46
                    
47_match_stringre = re.compile(r"""
                    
48    \""" [^"\\]* (?:
                    
67
                    
68_itemre = re.compile(r"""
                    
69    [ \t]*
                    
74
                    
75_closere = re.compile(r"""
                    
76    \s*
                    
                
cookielib.py git://github.com/IronLanguages/main.git | Python | 1810 lines
                    
121
                    
122TIMEZONE_RE = re.compile(r"^([-+])?(\d\d?):?(\d\d)?$")
                    
123def offset_from_tz_string(tz):
                    
189
                    
190STRICT_DATE_RE = re.compile(
                    
191    r"^[SMTWF][a-z][a-z], (\d\d) ([JFMASOND][a-z][a-z]) "
                    
192    "(\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$")
                    
193WEEKDAY_RE = re.compile(
                    
194    r"^(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)[a-z]*,?\s*", re.I)
                    
194    r"^(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)[a-z]*,?\s*", re.I)
                    
195LOOSE_HTTP_DATE_RE = re.compile(
                    
196    r"""^
                    
267
                    
268ISO_DATE_RE = re.compile(
                    
269    """^
                    
                
pydoc.py git://github.com/IronLanguages/main.git | Python | 2409 lines
                    
124
                    
125_re_stripid = re.compile(r' at 0x[0-9a-f]{6,16}(>+)$', re.IGNORECASE)
                    
126def stripid(text):
                    
                
gettext.py git://github.com/IronLanguages/main.git | Python | 594 lines
                    
100
                    
101    expr = re.compile(r'\!([^=])')
                    
102    plural = expr.sub(' not \\1', plural)
                    
105    # "a?b:c" to "test(a,b,c)".
                    
106    expr = re.compile(r'(.*?)\?(.*?):(.*)')
                    
107    def repl(x):
                    
                
doctest.py git://github.com/IronLanguages/main.git | Python | 2817 lines
                    
186        if feature is getattr(__future__, fname):
                    
187            flags |= feature.compiler_flag
                    
188    return flags
                    
                
desc.py git://github.com/IronLanguages/main.git | Python | 772 lines
                    
34# REs for Python signatures
                    
35py_sig_re = re.compile(
                    
36    r'''^ ([\w.]*\.)?            # class name(s)
                    
42
                    
43py_paramlist_re = re.compile(r'([\[\],])')  # split at '[', ']' and ','
                    
44
                    
45# REs for C signatures
                    
46c_sig_re = re.compile(
                    
47    r'''^([^(]*?)          # return type
                    
51    ''', re.VERBOSE)
                    
52c_funcptr_sig_re = re.compile(
                    
53    r'''^([^(]+?)          # return type
                    
57    ''', re.VERBOSE)
                    
58c_funcptr_name_re = re.compile(r'^\(\s*\*\s*(.*?)\s*\)$')
                    
59
                    
                
text.py git://github.com/IronLanguages/main.git | Python | 716 lines
                    
37# monkey-patch...
                    
38new_wordsep_re = re.compile(
                    
39        r'(\s+|'                                  # any whitespace
                    
                
autodoc.py git://github.com/IronLanguages/main.git | Python | 1125 lines
                    
37#: extended signature RE: with explicit module name separated by ::
                    
38py_ext_sig_re = re.compile(
                    
39    r'''^ ([\w.]+::)?            # explicit module name
                    
172    """
                    
173    marker_re = re.compile(marker)
                    
174    def process(app, what_, name, obj, options, lines):
                    
                
tokenize.py git://github.com/IronLanguages/main.git | Python | 410 lines
                    
98    re.compile, (Token, PseudoToken, Single3, Double3))
                    
99endprogs = {"'": re.compile(Single), '"': re.compile(Double),
                    
100            "'''": single3prog, '"""': double3prog,
                    
                
re.rst git://github.com/IronLanguages/main.git | ReStructuredText | 1264 lines
                    
218   expression, instead of passing a *flag* argument to the
                    
219   :func:`re.compile` function.
                    
220
                    
                
utils.py git://github.com/IronLanguages/main.git | Python | 780 lines
                    
21
                    
22_word_split_re = re.compile(r'(\s+)')
                    
23_punctuation_re = re.compile(
                    
28)
                    
29_simple_email_re = re.compile(r'^\S+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+$')
                    
30_striptags_re = re.compile(r'(<!--.*?-->|<[^>]*>)')
                    
30_striptags_re = re.compile(r'(<!--.*?-->|<[^>]*>)')
                    
31_entity_re = re.compile(r'&([^;]+);')
                    
32_letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
                    
78except ImportError:
                    
79    _py_identifier_re = re.compile(r'^[a-zA-Z_][a-zA-Z0-9]*$')
                    
80    def is_python_keyword(name):
                    
                
lexer.py git://github.com/IronLanguages/main.git | Python | 643 lines
                    
28# static regular expressions
                    
29whitespace_re = re.compile(r'\s+', re.U)
                    
30string_re = re.compile(r"('([^'\\]*(?:\\.[^'\\]*)*)'"
                    
31                       r'|"([^"\\]*(?:\\.[^"\\]*)*)")', re.S)
                    
32integer_re = re.compile(r'\d+')
                    
33
                    
38except SyntaxError:
                    
39    name_re = re.compile(r'\b[a-zA-Z_][a-zA-Z0-9_]*\b')
                    
40else:
                    
41    from jinja2 import _stringdefs
                    
42    name_re = re.compile(r'[%s][%s]*' % (_stringdefs.xid_start,
                    
43                                         _stringdefs.xid_continue))
                    
44
                    
45float_re = re.compile(r'(?<!\.)\d+\.\d+')
                    
46newline_re = re.compile(r'(\r\n|\r|\n)')
                    
                
filters.py git://github.com/IronLanguages/main.git | Python | 715 lines
                    
20
                    
21_word_re = re.compile(r'\w+(?u)')
                    
22
                    
                
tableparser.py git://github.com/IronLanguages/main.git | Python | 525 lines
                    
131
                    
132    head_body_separator_pat = re.compile(r'\+=[=+]+=\+ *$')
                    
133
                    
361
                    
362    head_body_separator_pat = re.compile('=[ =]*$')
                    
363    span_pat = re.compile('-[ -]*$')
                    
                
case.py git://github.com/IronLanguages/main.git | Python | 1070 lines
                    
124        if isinstance(expected_regexp, basestring):
                    
125            expected_regexp = re.compile(expected_regexp)
                    
126        if not expected_regexp.search(str(exc_value)):
                    
                
feedparser.py git://github.com/IronLanguages/main.git | Python | 484 lines
                    
28
                    
29NLCRE = re.compile('\r\n|\r|\n')
                    
30NLCRE_bol = re.compile('(\r\n|\r|\n)')
                    
30NLCRE_bol = re.compile('(\r\n|\r|\n)')
                    
31NLCRE_eol = re.compile('(\r\n|\r|\n)\Z')
                    
32NLCRE_crack = re.compile('(\r\n|\r|\n)')
                    
34# except controls, SP, and ":".
                    
35headerRE = re.compile(r'^(From |[\041-\071\073-\176]{1,}:|[\t ])')
                    
36EMPTYSTRING = ''
                    
300            separator = '--' + boundary
                    
301            boundaryre = re.compile(
                    
302                '(?P<sep>' + re.escape(separator) +
                    
                
message.py git://github.com/IronLanguages/main.git | Python | 797 lines
                    
23# existence of which force quoting of the parameter value.
                    
24tspecials = re.compile(r'[ \(\)<>@,;:\\"/\[\]\?=]')
                    
25
                    
                
dbtables.py git://github.com/IronLanguages/main.git | Python | 843 lines
                    
106        self.likestr = likestr.replace('%', '.*')
                    
107        self.re = re.compile('^'+self.likestr+'$', re_flags)
                    
108    def __call__(self, s):
                    
                
tokenize.py git://github.com/IronLanguages/main.git | Python | 500 lines
                    
106    re.compile, (Token, PseudoToken, Single3, Double3))
                    
107endprogs = {"'": re.compile(Single), '"': re.compile(Double),
                    
108            "'''": single3prog, '"""': double3prog,
                    
238
                    
239cookie_re = re.compile("coding[:=]\s*([-\w.]+)")
                    
240
                    
                
test_sgmllib.py git://github.com/IronLanguages/main.git | Python | 439 lines
                    
69
                    
70    entity_or_charref = re.compile('(?:&([a-zA-Z][-.a-zA-Z0-9]*)'
                    
71        '|&#(x[0-9a-zA-Z]+|[0-9]+))(;?)')
                    
                
test_re.py git://github.com/IronLanguages/main.git | Python | 889 lines
                    
20        s = 'QabbbcR'
                    
21        x = re.compile('ab+c')
                    
22        y = proxy(x)
                    
111        # Verify that flags do not get silently ignored with compiled patterns
                    
112        pattern = re.compile('.')
                    
113        self.assertRaises(ValueError, re.match, pattern, 'A', re.I)
                    
115        self.assertRaises(ValueError, re.findall, pattern, 'A', re.I)
                    
116        self.assertRaises(ValueError, re.compile, pattern, re.I)
                    
117
                    
119        # A regex that triggered a bug in the sre-code validator
                    
120        re.compile("(?P<quote>)(?(quote))")
                    
121
                    
237
                    
238        pat = re.compile('((a)|(b))(c)?')
                    
239        self.assertEqual(pat.match('a').groups(), ('a', 'a', None, None))
                    
                
fancy_getopt.py git://github.com/IronLanguages/main.git | Python | 484 lines
                    
23longopt_pat = r'[a-zA-Z](?:[a-zA-Z0-9-]*)'
                    
24longopt_re = re.compile(r'^%s$' % longopt_pat)
                    
25
                    
26# For recognizing "negative alias" options, eg. "quiet=!verbose"
                    
27neg_alias_re = re.compile("^(%s)=!(%s)$" % (longopt_pat, longopt_pat))
                    
28
                    
                
imaplib.py git://github.com/IronLanguages/main.git | Python | 1518 lines
                    
83
                    
84Continuation = re.compile(r'\+( (?P<data>.*))?')
                    
85Flags = re.compile(r'.*FLAGS \((?P<flags>[^\)]*)\)')
                    
85Flags = re.compile(r'.*FLAGS \((?P<flags>[^\)]*)\)')
                    
86InternalDate = re.compile(r'.*INTERNALDATE "'
                    
87        r'(?P<day>[ 0123][0-9])-(?P<mon>[A-Z][a-z][a-z])-(?P<year>[0-9][0-9][0-9][0-9])'
                    
90        r'"')
                    
91Literal = re.compile(r'.*{(?P<size>\d+)}$')
                    
92MapCRLF = re.compile(r'\r\n|\r|\n')
                    
92MapCRLF = re.compile(r'\r\n|\r|\n')
                    
93Response_code = re.compile(r'\[(?P<type>[A-Z-]+)( (?P<data>[^\]]*))?\]')
                    
94Untagged_response = re.compile(r'\* (?P<type>[A-Z-]+)( (?P<data>.*))?')
                    
94Untagged_response = re.compile(r'\* (?P<type>[A-Z-]+)( (?P<data>.*))?')
                    
95Untagged_status = re.compile(r'\* (?P<data>\d+) (?P<type>[A-Z-]+)( (?P<data2>.*))?')
                    
96
                    
                
textwrap.py git://github.com/IronLanguages/main.git | Python | 417 lines
                    
86    # (after stripping out empty strings).
                    
87    wordsep_re = re.compile(
                    
88        r'(\s+|'                                  # any whitespace
                    
95    #   Hello/ /there/ /--/ /you/ /goof-ball,/ /use/ /the/ /-b/ /option!/
                    
96    wordsep_simple_re = re.compile(r'(\s+)')
                    
97
                    
99    # is US-ASCII only (and therefore English-only)
                    
100    sentence_end_re = re.compile(r'[%s]'              # lowercase letter
                    
101                                 r'[\.\!\?]'          # sentence-ending punct.
                    
129        # the TextWrapper class' wordsep_re attribute.
                    
130        self.wordsep_re_uni = re.compile(self.wordsep_re.pattern, re.U)
                    
131        self.wordsep_simple_re_uni = re.compile(
                    
362
                    
363_whitespace_only_re = re.compile('^[ \t]+$', re.MULTILINE)
                    
364_leading_whitespace_re = re.compile('(^[ \t]*)(?:[^ \t\n])', re.MULTILINE)
                    
                
trace.py git://github.com/IronLanguages/main.git | Python | 827 lines
                    
130# Simple rx to find lines with no code.
                    
131rx_blank = re.compile(r'^\s*(#.*)?$')
                    
132
                    
                
string.py git://github.com/IronLanguages/main.git | Python | 642 lines
                    
120                }
                    
121        cls.pattern = _re.compile(pattern, _re.IGNORECASE | _re.VERBOSE)
                    
122
                    
                
smtplib.py git://github.com/IronLanguages/main.git | Python | 848 lines
                    
60
                    
61OLDSTYLE_AUTH = re.compile(r"auth=(.*)", re.I)
                    
62
                    
                
plistlib.py git://github.com/IronLanguages/main.git | Python | 474 lines
                    
186#  a loss of precision)
                    
187_dateParser = re.compile(r"(?P<year>\d\d\d\d)(?:-(?P<month>\d\d)(?:-(?P<day>\d\d)(?:T(?P<hour>\d\d)(?::(?P<minute>\d\d)(?::(?P<second>\d\d))?)?)?)?)?Z")
                    
188
                    
207# Regex to find any control chars, except for \t \n and \r
                    
208_controlCharPat = re.compile(
                    
209    r"[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f"
                    
                
argparse.py git://github.com/IronLanguages/main.git | Python | 2347 lines
                    
179
                    
180        self._whitespace_matcher = _re.compile(r'\s+')
                    
181        self._long_break_matcher = _re.compile(r'\n\n\n+')
                    
                
pdb.py git://github.com/IronLanguages/main.git | Python | 1338 lines
                    
31def find_function(funcname, filename):
                    
32    cre = re.compile(r'def\s+%s\s*[(]' % re.escape(funcname))
                    
33    try:
                    
                
mhlib.py git://github.com/IronLanguages/main.git | Python | 1005 lines
                    
237
                    
238numericprog = re.compile('^[1-9][0-9]*$')
                    
239def isnumeric(str):
                    
                
re_test.py git://github.com/IronLanguages/main.git | Python | 826 lines
                    
43    #compile
                    
44    Assert(hasattr(re.compile("(abc){1}"), "pattern"))
                    
45    Assert(hasattr(re.compile("(abc){1}", re.L), "pattern"))
                    
45    Assert(hasattr(re.compile("(abc){1}", re.L), "pattern"))
                    
46    Assert(hasattr(re.compile("(abc){1}", flags=re.L), "pattern"))
                    
47    
                    
103    AreEqual([x.group() for x in re.finditer("(abc){1}", "xyzabcabc")], ['abc', 'abc'])
                    
104    rex = re.compile("foo")
                    
105    for m in rex.finditer("this is a foo and a foo bar"):
                    
151    '''
                    
152    pattern = re.compile("(abc){1}")
                    
153    
                    
206    AreEqual(pattern.flags, 0)
                    
207    AreEqual(re.compile("(abc){1}", re.L).flags, re.L)
                    
208    
                    
                
regressions.py git://github.com/IronLanguages/main.git | Python | 1016 lines
                    
156    for data, groups in tests.iteritems():
                    
157        regex = re.compile(data)
                    
158        message = "'%s' should have %d groups, not %d" % (data, groups, regex.groups)
                    
226    import re
                    
227    format_re = re.compile(r'(?P<order1>[<>|=]?)(?P<repeats> *[(]?[ ,0-9]*[)]? *)(?P<order2>[<>|=]?)(?P<dtype>[A-Za-z0-9.]*)')
                    
228    
                    
                
content.py git://github.com/xbmc/xbmc.git | Python | 585 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*::" )
                    
229
                    
                
configurable.py https://code.google.com/p/fanficdownloader/ | Python | 605 lines
                    
40    try:
                    
41        return re.compile(regex)
                    
42    except Exception, e: 
                    
                
fields.py git://github.com/hmarr/mongoengine.git | Python | 1433 lines
                    
43    def __init__(self, regex=None, max_length=None, min_length=None, **kwargs):
                    
44        self.regex = re.compile(regex) if regex else None
                    
45        self.max_length = max_length
                    
93            value = re.escape(value)
                    
94            value = re.compile(regex % value, flags)
                    
95        return value
                    
103
                    
104    URL_REGEX = re.compile(
                    
105        r'^https?://'
                    
135
                    
136    EMAIL_REGEX = re.compile(
                    
137        r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*"  # dot-atom
                    
                
queryset.py git://github.com/hmarr/mongoengine.git | Python | 1975 lines
                    
51
                    
52RE_TYPE = type(re.compile(''))
                    
53
                    
                
csamtools.pyx https://code.google.com/p/pysam/ | Cython | 3852 lines
                    
142    CIGAR2CODE = dict( [ord(y),x] for x,y in enumerate( CODE2CIGAR) )
                    
143CIGAR_REGEX = re.compile( "([MIDNSHP=X])(\d+)" )
                    
144
                    
                
VCF.py https://code.google.com/p/pysam/ | Python | 1088 lines
                    
51
                    
52gtsRegEx = re.compile("[|/\\\\]")
                    
53alleleRegEx = re.compile('^[ACGTN]+$')
                    
                
tests.py https://bitbucket.org/carljm/django-localeurl/ | Python | 472 lines
                    
33        LOCALE_INDEPENDENT_PATHS=(
                    
34            re.compile('^/$'),
                    
35            '^/test/independent/',
                    
                
default.py https://bitbucket.org/sqlalchemy/sqlalchemy/ | Python | 812 lines
                    
21
                    
22AUTOCOMMIT_REGEXP = re.compile(
                    
23            r'\s*(?:UPDATE|INSERT|CREATE|DELETE|DROP|ALTER)',
                    
                
compiler.py https://bitbucket.org/sqlalchemy/sqlalchemy/ | Python | 1951 lines
                    
51
                    
52LEGAL_CHARACTERS = re.compile(r'^[A-Z0-9_$]+$', re.I)
                    
53ILLEGAL_INITIAL_CHARACTERS = set([str(x) for x in xrange(0, 10)]).union(['$'])
                    
54
                    
55BIND_PARAMS = re.compile(r'(?<![:\w\$\x5c]):([\w\$]+)(?![:\w\$])', re.UNICODE)
                    
56BIND_PARAMS_ESC = re.compile(r'\x5c(:[\w\$]+)(?![:\w\$])', re.UNICODE)
                    
                
Arte.py https://code.google.com/p/tvdownloader/ | Python | 444 lines
                    
77    # Expression réguličre pour extraire les catégories
                    
78    listeArteLiveWebCategoriesPattern = re.compile("<a href=\"http://liveweb.arte.tv/fr/cat/(.*?)\">(.*?)</a>", re.DOTALL)
                    
79    # Rang dans le résultat de l'expression réguličre précédente
                    
84    # Expression réguličre pour extraire le lien du flux RSS
                    
85    videoArteLiveWebRSSPattern = re.compile("<a href=\"(http://download.liveweb.arte.tv/o21/liveweb/rss/home.*?\.rss)\"", re.DOTALL)
                    
86
                    
87    # Expression réguličre pour extraire le lien vers la page de la video, ainsi que sa date
                    
88    videoArteLiveWebVideosPattern = re.compile("<link>(http://liveweb.arte.tv/fr/video/.*?)</link>.*?<pubDate>(.*?)</pubDate>", re.DOTALL)
                    
89    #~ videoArteLiveWebEventIDPattern = re.compile("eventID=(.*?)&")
                    
89    #~ videoArteLiveWebEventIDPattern = re.compile("eventID=(.*?)&")
                    
90    #~ videoArteLiveWebEventIDPattern = re.compile("new LwEvent('(.*?)', '');")
                    
91    videoArteLiveWebEventIDPattern = re.compile("/media/event/(.*?)/", re.DOTALL)
                    
93    
                    
94    videoArteLiveWebTitrePattern = re.compile("<nameFr>(.*?)</nameFr>", re.DOTALL)
                    
95    videoArteLiveWebLienPatternHD = re.compile("<urlHd>(.*?)</urlHd>", re.DOTALL)
                    
                
Arte.py https://code.google.com/p/tvdownloader/ | Python | 489 lines
                    
78    # Version initiale
                    
79    #~ listeArteLiveWebCategoriesPattern = re.compile("<a href=\"http://liveweb.arte.tv/fr/cat/(.*?)\">(.*?)</a>", re.DOTALL)
                    
80    # Mise a jour du 30/09/2010
                    
80    # Mise a jour du 30/09/2010
                    
81    listeArteLiveWebCategoriesPattern = re.compile("<li><a href=\"http://liveweb.arte.tv/fr/cat/(.*?)\" class=\"accueil\">(.*?)</a></li>", re.DOTALL)
                    
82    # Rang dans le résultat de l'expression réguličre précédente
                    
87    # Expression réguličre pour extraire le lien du flux RSS
                    
88    videoArteLiveWebRSSPattern = re.compile("<a href=\"(http://download.liveweb.arte.tv/o21/liveweb/rss/home.*?\.rss)\"", re.DOTALL)
                    
89
                    
90    # Expression réguličre pour extraire le lien vers la page de la video, ainsi que sa date
                    
91    videoArteLiveWebVideosPattern = re.compile("<link>(http://liveweb.arte.tv/fr/video/.*?)</link>.*?<pubDate>(.*?)</pubDate>", re.DOTALL)
                    
92    videoArteLiveWebEventIDPattern = re.compile("new LwEvent\('(.*?)', ''\);", re.DOTALL)
                    
94    
                    
95    videoArteLiveWebTitrePattern = re.compile("<nameFr>(.*?)</nameFr>", re.DOTALL)
                    
96    videoArteLiveWebLienPatternHD = re.compile("<urlHd>(.*?)</urlHd>", re.DOTALL)
                    
                
cythonpp.py https://code.google.com/p/gevent/ | Python | 797 lines
                    
23# Parameter name in macros must match this regex:
                    
24param_name_re = re.compile('^[a-zA-Z_]\w*$')
                    
25
                    
26# First line of a definition of a new macro:
                    
27define_re = re.compile(r'^#define\s+([a-zA-Z_]\w*)(\((?:[^,)]+,)*[^,)]+\))?\s+(.*)$')
                    
28
                    
29# Conditional directive:
                    
30condition_re = re.compile(r'^#(ifdef\s+.+|if\s+.+|else\s*|endif\s*)$')
                    
31
                    
                
xplor.py http://cing.googlecode.com/svn/trunk/ | Python | 509 lines
                    
78#END {CA2}
                    
79    reMatch = re.compile('[-+](\d)$') # The 24 character standard notation from time.asctime()
                    
80    searchObj = reMatch.search(atomNameXplor)
                    
                
DataTablesServer.py http://cing.googlecode.com/svn/trunk/ | Python | 447 lines
                    
63    """
                    
64    pattern = re.compile( '^\d\w\w\w$' )
                    
65    return pattern.match( chk_string )
                    
                
Text.py http://cing.googlecode.com/svn/trunk/ | Python | 567 lines
                    
39# changing the wild import to specific import; that sounds like bad python if it matters.
                    
40#pattern_tagtable_loop = re.compile(r"""
                    
41#^\s*  loop_  \s*                                  # Begin of loop
                    
46
                    
47pattern_semicolon_block = re.compile(r"""
                    
48    ^;                                          # semicolon at begin, any text and then eol
                    
52
                    
53pattern_eol_string     = re.compile( eol_string, re.MULTILINE )
                    
54
                    
55## Next pattern tells when search for on ONE tagvalue if it needs quotes
                    
56pattern_quotes_needed  = re.compile( r'[\s\'\"]|^_|^\#' )
                    
57
                    
60## mentioned as needing quotes unnecessarily but that's dealt with in the code by further checking
                    
61pattern_quotes_needed_2= re.compile( r'[\s\'\"]|^_|,_|,\#' )
                    
62
                    
                
Symtab.py http://cing.googlecode.com/svn/trunk/ | Python | 1400 lines
                    
19
                    
20identifier_pattern = re.compile(r"[A-Za-z_][A-Za-z0-9_]*$")
                    
21
                    
                
util.py http://unladen-swallow.googlecode.com/svn/trunk/ | Python | 573 lines
                    
80        osname = "cygwin"
                    
81        rel_re = re.compile (r'[\d.]+')
                    
82        m = rel_re.match(release)
                    
313    import string
                    
314    _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
                    
315    _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'")
                    
315    _squote_re = re.compile(r"'(?:[^'\\]|\\.)*'")
                    
316    _dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"')
                    
317
                    
                
utils.py http://neatx.googlecode.com/svn/trunk/ | Python | 880 lines
                    
44
                    
45_SHELL_UNQUOTED_RE = re.compile('^[-.,=:/_+@A-Za-z0-9]+$')
                    
46
                    
                
agent.py http://neatx.googlecode.com/svn/trunk/ | Python | 659 lines
                    
45  constants.SESS_STATE_STARTING:
                    
46    re.compile(r"^Session:\s+Starting\s+session\s+at\s+"),
                    
47  constants.SESS_STATE_WAITING:
                    
47  constants.SESS_STATE_WAITING:
                    
48    re.compile(r"Info:\s+Waiting\s+for\s+connection\s+from\s+"
                    
49               r"'(?P<host>.*)'\s+on\s+port\s+'(?P<port>\d+)'\."),
                    
50  constants.SESS_STATE_RUNNING:
                    
51    re.compile(r"^Session:\s+Session\s+(started|resumed)\s+at\s+"),
                    
52  constants.SESS_STATE_SUSPENDING:
                    
52  constants.SESS_STATE_SUSPENDING:
                    
53    re.compile(r"^Session:\s+Suspending\s+session\s+at\s+"),
                    
54  constants.SESS_STATE_SUSPENDED:
                    
54  constants.SESS_STATE_SUSPENDED:
                    
55    re.compile(r"^Session:\s+Session\s+suspended\s+at\s+"),
                    
56  constants.SESS_STATE_TERMINATING:
                    
                
 

Source

Language