PageRenderTime 310ms queryTime 21ms sortTime 5ms getByIdsTime 120ms findMatchingLines 17ms

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

Not the results you expected?
SimpleJSONRPCServer.py http://apple-tv2-xbmc.googlecode.com/svn/trunk/ | Python | 283 lines
                    
159#        try:
                    
160#            urlParts = re.compile(r'/(.+?)/(.+?)\?(.*)').findall(self.path)
                    
161#            self.path = '/' + urlParts[0][0]
                    
                
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)
                    
                
default.py git://github.com/heynemann/skink.git | Python | 375 lines
                    
19
                    
20AUTOCOMMIT_REGEXP = re.compile(r'\s*(?:UPDATE|INSERT|CREATE|DELETE|DROP|ALTER)',
                    
21                               re.I | re.UNICODE)
                    
                
breakage2tst.py git://git.savannah.gnu.org/gnugo.git | Python | 204 lines
                    
82		current_line = tstlines.pop(0)
                    
83		command_pattern = re.compile("^%d " % number)
                    
84
                    
                
pyini.py http://uliweb.googlecode.com/svn/trunk/ | Python | 419 lines
                    
45
                    
46r_encoding = re.compile(r'\s*coding\s*[=:]\s*([-\w.]+)')
                    
47__default_env__ = {}
                    
                
wordTranslator.py http://nltk.googlecode.com/svn/trunk/ | Python | 419 lines
                    
134			if len(english_tokens) > 0 and len(german_tokens) > 0:
                    
135				doc_regexp = re.compile(r'<DOC')
                    
136				if doc_regexp.match(english_tokens[0].type()) \
                    
179		# non-word characters 
                    
180		punct_regexp = re.compile(r'[^a-zA-Z0-9]*$')
                    
181		if punct_regexp.match(word):
                    
                
runtime-gdb.py https://code.google.com/p/gofy/ | Python | 399 lines
                    
32
                    
33	pattern = re.compile(r'^struct string$')
                    
34
                    
47
                    
48	pattern = re.compile(r'^struct \[\]')
                    
49
                    
71
                    
72	pattern = re.compile(r'^struct hash<.*>$')
                    
73
                    
111
                    
112	pattern = re.compile(r'^struct hchan<.*>$')
                    
113
                    
                
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):
                    
                
lexer.py https://code.google.com/p/python-sqlparse/ | Python | 324 lines
                    
80            try:
                    
81                rex = re.compile(tdef[0], rflags).match
                    
82            except Exception, err:
                    
                
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                              ]
                    
                
JSLiteParser.py http://raft.googlecode.com/svn/trunk/ | Python | 287 lines
                    
37        self._comments = []
                    
38        self.re_octal_digits = re.compile('[0-7]{3}')
                    
39        self.re_escape_string = re.compile(r'\\(?:[0-7]{3}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|.)')
                    
39        self.re_escape_string = re.compile(r'\\(?:[0-7]{3}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|.)')
                    
40        self.re_identifier = re.compile(r'^[$_a-zA-Z0-9.]+$')
                    
41        self.re_keywords = re.compile(r'^(?:break|case|catch|const|continue|debugger|default|delete|do|else|enum|false|finally|for|function|if|in|instanceof|new|null|return|switch|this|throw|true|try|typeof|var|void|while|with)$')
                    
41        self.re_keywords = re.compile(r'^(?:break|case|catch|const|continue|debugger|default|delete|do|else|enum|false|finally|for|function|if|in|instanceof|new|null|return|switch|this|throw|true|try|typeof|var|void|while|with)$')
                    
42        self.re_no_regex_start = re.compile(r'[\]]')
                    
43        self.re_space = re.compile(r'\s')
                    
                
marshal.py http://nltk.googlecode.com/svn/trunk/ | Python | 207 lines
                    
75        
                    
76        pattern = re.compile(r'^(.+):(.+?)$', re.UNICODE)
                    
77        for line in handler.readlines():
                    
121        
                    
122        pattern = re.compile(r'^(.+):(.+?)$', re.UNICODE)
                    
123        for line in lines[2:]:
                    
173        
                    
174        pattern = re.compile(r'^\[(.+)\]:(.+):(.+?)$', re.UNICODE)
                    
175        
                    
182        context_pattern_str = r'^(.+?)%s$' % ( r':(.+?)' * (self._n-2) )
                    
183        context_pattern = re.compile(context_pattern_str, re.UNICODE)
                    
184        
                    
                
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 + "$")
                    
                
megavideo.py http://dmd-xbmc.googlecode.com/svn/trunk/ | Python | 311 lines
                    
27	if mega.startswith('http://wwwstatic.megavideo.com'):
                    
28		mega = re.compile('.*v=(.+?)$').findall(mega)
                    
29		mega = mega[0]
                    
30	if mega.startswith('http://www.megavideo.com/v/'):
                    
31		mega = re.compile('.*/v/(.+?)$').findall(mega)
                    
32		mega = mega[0][0:8]
                    
97    try:
                    
98        s = re.compile(' s="(.+?)"').findall(data)
                    
99        k1 = re.compile(' k1="(.+?)"').findall(data)
                    
99        k1 = re.compile(' k1="(.+?)"').findall(data)
                    
100        k2 = re.compile(' k2="(.+?)"').findall(data)
                    
101        un = re.compile(' un="(.+?)"').findall(data)
                    
113    print("[megavideo.py] HD Link")
                    
114    hd = re.compile(' hd="(.+?)"').findall(data)
                    
115    if len(hd)>0 and hd[0]=="1":
                    
                
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:_]*')
                    
                
JavaCodeFormatterFacade.java http://eclipse-code-formatter-intellij-plugin.googlecode.com/svn/ | Java | 139 lines
                    
116        // TODO: Ideally, the IntelliJ project's language level should be the default value.
                    
117        defaultConfig.setProperty("org.eclipse.jdt.core.compiler.source", "1.5");
                    
118        return defaultConfig;
                    
122    protected void validateConfig(Properties config) {
                    
123        String sourceVersionString = config.getProperty("org.eclipse.jdt.core.compiler.source");
                    
124        if (sourceVersionString != null) {
                    
128            } catch (NumberFormatException e) {
                    
129                throw new RuntimeException("Illegal value for org.eclipse.jdt.core.compiler.source property ("
                    
130                        + sourceVersionString + ") - supported Java source versions are 1.5, 1.6, 1.7, or 1.8.");
                    
132            if (sourceVersion < 1.5) {
                    
133                throw new RuntimeException("Illegal value for org.eclipse.jdt.core.compiler.source property ("
                    
134                        + sourceVersionString + ") - Eclipse formatter requires a Java source version >= 1.5.");
                    
                
convert-ly.py git://git.savannah.gnu.org/lilypond.git | Python | 391 lines
                    
40lilypond_version_re_str = '\\\\version *\"([0-9.]+)"'
                    
41lilypond_version_re = re.compile (lilypond_version_re_str)
                    
42
                    
43lilypond_version_strict_re_str = '\\\\version *\"([0-9]+[.][0-9]+[.][0-9]+)"'
                    
44lilypond_version_strict_re = re.compile (lilypond_version_strict_re_str)
                    
45
                    
                
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
                    
                
hotline.py https://code.google.com/p/ardj/ | Python | 375 lines
                    
32
                    
33fn_filter = re.compile('wav|mp3|ogg', re.I)
                    
34
                    
                
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)
                    
                
nltk.corpus.reader.pl196x-module.html http://nltk.googlecode.com/svn/trunk/ | HTML | 213 lines
                    
114    </td><td class="summary">
                    
115        <a name="PARA"></a><span class="summary-name">PARA</span> = <code title="re.compile(r'&lt;p(?: [^&gt;]*)?&gt;(.*?)&lt;/p&gt;')">re.compile(r'&lt;p<code class="re-group">(?:</code> <code class="re-group">[^</code>&gt;<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-op">?</code>&gt;<code class="re-group">(</code>.<code class="re-op">*?</code><code class="re-group">)</code>&lt;/p&gt;')</code>
                    
116    </td>
                    
121    </td><td class="summary">
                    
122        <a name="SENT"></a><span class="summary-name">SENT</span> = <code title="re.compile(r'&lt;s(?: [^&gt;]*)?&gt;(.*?)&lt;/s&gt;')">re.compile(r'&lt;s<code class="re-group">(?:</code> <code class="re-group">[^</code>&gt;<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-op">?</code>&gt;<code class="re-group">(</code>.<code class="re-op">*?</code><code class="re-group">)</code>&lt;/s&gt;')</code>
                    
123    </td>
                    
128    </td><td class="summary">
                    
129        <a name="TAGGEDWORD"></a><span class="summary-name">TAGGEDWORD</span> = <code title="re.compile(r'&lt;([wc](?: [^&gt;]*)?&gt;)(.*?)&lt;/[wc]&gt;')">re.compile(r'&lt;<code class="re-group">(</code><code class="re-group">[</code>wc<code class="re-group">]</code><code class="re-group">(?:</code> <code class="re-group">[^</code>&gt;<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-op">?</code>&gt;<code class="re-group">)</code><code class="re-group">(</code>.<code class="re-op">*?</code><code class="re-group">)</code>&lt;/<code class="re-group">[</code>wc<code class="re-group">]</code>&gt;')</code>
                    
130    </td>
                    
135    </td><td class="summary">
                    
136        <a name="WORD"></a><span class="summary-name">WORD</span> = <code title="re.compile(r'&lt;[wc](?: [^&gt;]*)?&gt;(.*?)&lt;/[wc]&gt;')">re.compile(r'&lt;<code class="re-group">[</code>wc<code class="re-group">]</code><code class="re-group">(?:</code> <code class="re-group">[^</code>&gt;<code class="re-group">]</code><code class="re-op">*</code><code class="re-group">)</code><code class="re-op">?</code>&gt;<code class="re-group">(</code>.<code class="re-op">*?</code><code class="re-group">)</code>&lt;/<code class="re-group">[</code>wc<code class="re-group">]</code>&gt;')</code>
                    
137    </td>
                    
142    </td><td class="summary">
                    
143        <a name="TYPE"></a><span class="summary-name">TYPE</span> = <code title="re.compile(r'type=&quot;(.*?)&quot;')">re.compile(r'type=&quot;<code class="re-group">(</code>.<code class="re-op">*?</code><code class="re-group">)</code>&quot;')</code>
                    
144    </td>
                    
                
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
                    
                
GroovyCompilerTests.java http://groovy-eclipse.googlecode.com/svn/trunk/ | Java | 228 lines
                    
1package org.codehaus.groovy.eclipse.core.compiler;
                    
2
                    
                
irc.py git://github.com/coleifer/irc.git | Python | 359 lines
                    
22    # a couple handy regexes for reading text
                    
23    nick_re = re.compile('.*?Nickname is already in use')
                    
24    nick_change_re = re.compile(':(?P<old_nick>.*?)!\S+\s+?NICK\s+:\s*(?P<new_nick>[-\w]+)')
                    
24    nick_change_re = re.compile(':(?P<old_nick>.*?)!\S+\s+?NICK\s+:\s*(?P<new_nick>[-\w]+)')
                    
25    ping_re = re.compile('^PING (?P<payload>.*)')
                    
26    chanmsg_re = re.compile(':(?P<nick>.*?)!\S+\s+?PRIVMSG\s+(?P<channel>#+[-\w]+)\s+:(?P<message>[^\n\r]+)')
                    
26    chanmsg_re = re.compile(':(?P<nick>.*?)!\S+\s+?PRIVMSG\s+(?P<channel>#+[-\w]+)\s+:(?P<message>[^\n\r]+)')
                    
27    privmsg_re = re.compile(':(?P<nick>.*?)!~\S+\s+?PRIVMSG\s+[^#][^:]+:(?P<message>[^\n\r]+)')
                    
28    part_re = re.compile(':(?P<nick>.*?)!\S+\s+?PART\s+(?P<channel>#+[-\w]+)')
                    
28    part_re = re.compile(':(?P<nick>.*?)!\S+\s+?PART\s+(?P<channel>#+[-\w]+)')
                    
29    join_re = re.compile(':(?P<nick>.*?)!\S+\s+?JOIN\s+.*?(?P<channel>#+[-\w]+)')
                    
30    quit_re = re.compile(':(?P<nick>.*?)!\S+\s+?QUIT\s+.*')
                    
30    quit_re = re.compile(':(?P<nick>.*?)!\S+\s+?QUIT\s+.*')
                    
31    registered_re = re.compile(':(?P<server>.*?)\s+(?:376|422)')
                    
32
                    
                
AfterDownload_ConditionForm.pas http://dm-after-download.googlecode.com/svn/trunk/ | Pascal | 536 lines
                    
431      CanClose:=true;
                    
432      re.Compile;
                    
433     except
                    
                
tskfuse.py https://code.google.com/p/pytsk/ | Python | 282 lines
                    
25
                    
26int_re = re.compile("^(\d+)([kKmMgGs]?)$")
                    
27
                    
                
kongulo.py http://devj.googlecode.com/svn/trunk/ | Python | 429 lines
                    
61# this is much more lenient, not requiring HTML to be valid.
                    
62_LINK_RE = re.compile(r'<\s*(a|img).+href\s*=\s*"?(.+?)"?(\s|>)',
                    
63                      re.MULTILINE | re.IGNORECASE)
                    
66# Matches <frame src="bla"> tags.
                    
67_FRAME_RE = re.compile(r'<\s*(frame).+src\s*=\s*"?(.+?)"?(\s|>)',
                    
68                       re.MULTILINE | re.IGNORECASE)
                    
71# Digs out the text of an HTML document's title.
                    
72_TITLE_RE = re.compile(r'<\s*title.*?>(.+)</\s*title\s*>',
                    
73                       re.MULTILINE | re.IGNORECASE)
                    
185    self.robots = {}  # Dict of robot URLs to robot parsers
                    
186    self.match_url = re.compile(match_url)
                    
187  
                    
                
twogtp.py https://code.google.com/p/pygo1963/ | Python | 678 lines
                    
241        infile.close
                    
242        size = re.compile("SZ\[[0-9]+\]")
                    
243        move = re.compile(";[BW]\[[a-z]{0,2}\]")
                    
                
scrambled_egg.py http://scrambled-egg.googlecode.com/svn/ | Python | 1615 lines
                    
52#
                    
53NO_TAGS = re.compile(
                    
54    '<#>(?P<ts>[0-9a-zA-Z ]{1,3}:[0-9a-zA-Z ]{1,3}:[0-9a-zA-Z ]{1,3})</?#>|' \
                    
                
rss.py http://lh-abc.googlecode.com/svn/trunk/ | Python | 986 lines
                    
29# Smart episode detection regex
                    
30matchesmodes = [re.compile("(?P<name>.*?)s(?P<f_s>[0-9]+)e(?P<f_e>[0-9]+)[\\-\\+]s(?P<l_s>[0-9]+)e(?P<l_e>[0-9]+).*?"),
                    
31                re.compile("(?P<name>.*?)(?P<f_s>[0-9]+)x(?P<f_e>[0-9]+)[\\-\\+](?P<l_s>[0-9]+)x(?P<l_e>[0-9]+).*?"),
                    
31                re.compile("(?P<name>.*?)(?P<f_s>[0-9]+)x(?P<f_e>[0-9]+)[\\-\\+](?P<l_s>[0-9]+)x(?P<l_e>[0-9]+).*?"),
                    
32                re.compile("(?P<name>.*?)(?P<f_s>[0-9]+)(?P<f_e>[0-9]{2})[\\-\\+](?P<l_s>[0-9]+)(?P<l_e>[0-9]{2}).*?"),
                    
33                re.compile("(?P<name>.*?)s(?P<f_s>[0-9]+)e(?P<f_e>[0-9]+)[\\-\\+]e(?P<l_e>[0-9]+).*?"),
                    
33                re.compile("(?P<name>.*?)s(?P<f_s>[0-9]+)e(?P<f_e>[0-9]+)[\\-\\+]e(?P<l_e>[0-9]+).*?"),
                    
34                re.compile("(?P<name>.*?)s(?P<f_s>[0-9]+)e(?P<f_e>[0-9]+)[\\-\\+](?P<l_e>[0-9]+).*?"),
                    
35                re.compile("(?P<name>.*?)(?P<f_s>[0-9]+)x(?P<f_e>[0-9]+)[\\-\\+](?P<l_e>[0-9]+).*?"),
                    
35                re.compile("(?P<name>.*?)(?P<f_s>[0-9]+)x(?P<f_e>[0-9]+)[\\-\\+](?P<l_e>[0-9]+).*?"),
                    
36                re.compile("(?P<name>.*?)(?P<f_s>[0-9]+)(?P<f_e>[0-9]{2})[\\-\\+](?P<l_e>[0-9]{2}).*?"),
                    
37                re.compile("(?P<name>.*?)s(?P<f_s>[0-9]+)e(?P<f_e>[0-9]+).*?"),
                    
37                re.compile("(?P<name>.*?)s(?P<f_s>[0-9]+)e(?P<f_e>[0-9]+).*?"),
                    
38                re.compile("(?P<name>.*?)(?P<f_s>[0-9]+)x(?P<f_e>[0-9]+).*?"),                
                    
39                re.compile("(?P<name>.*?)s(?P<f_s>[0-9]+).*?"),
                    
                
search.py http://lh-abc.googlecode.com/svn/trunk/ | Python | 675 lines
                    
14
                    
15regex = re.compile("(?P<name>.*?)\[(?P<seeds>[0-9]+)/(?P<peers>[0-9]+)\]")
                    
16        
                    
                
GroovyAutoIndentStrategy.java http://groovy-eclipse.googlecode.com/svn/trunk/ | Java | 1257 lines
                    
5import org.eclipse.jdt.core.ToolFactory;
                    
6import org.eclipse.jdt.core.compiler.IProblem;
                    
7import org.eclipse.jdt.core.compiler.IScanner;
                    
7import org.eclipse.jdt.core.compiler.IScanner;
                    
8import org.eclipse.jdt.core.compiler.ITerminalSymbols;
                    
9import org.eclipse.jdt.core.compiler.InvalidInputException;
                    
                
GroovyIndenter.java http://groovy-eclipse.googlecode.com/svn/trunk/ | Java | 1669 lines
                    
366		private boolean hasGenerics() {
                    
367			return JavaCore.VERSION_1_5.compareTo(getCoreFormatterOption(JavaCore.COMPILER_SOURCE)) <= 0;
                    
368		}
                    
                
GroovyProject.java http://groovy-eclipse.googlecode.com/svn/trunk/ | Java | 1249 lines
                    
49import org.codehaus.groovy.eclipse.core.builder.GroovyNature;
                    
50import org.codehaus.groovy.eclipse.core.compiler.GroovyCompiler;
                    
51import org.codehaus.groovy.eclipse.core.compiler.GroovyCompilerConfigurationBuilder;
                    
51import org.codehaus.groovy.eclipse.core.compiler.GroovyCompilerConfigurationBuilder;
                    
52import org.codehaus.groovy.eclipse.core.compiler.IGroovyCompilationReporter;
                    
53import org.codehaus.groovy.eclipse.core.compiler.IGroovyCompiler;
                    
53import org.codehaus.groovy.eclipse.core.compiler.IGroovyCompiler;
                    
54import org.codehaus.groovy.eclipse.core.compiler.IGroovyCompilerConfiguration;
                    
55import org.codehaus.groovy.eclipse.core.preferences.PreferenceConstants;
                    
                
GroovyLexer.java http://groovy-eclipse.googlecode.com/svn/trunk/ | Java | 3401 lines
                    
2
                    
3package org.codehaus.groovy.eclipse.core.compiler.internal.antlr;
                    
4import org.codehaus.groovy.antlr.*;
                    
                
GroovyCompiler.java http://groovy-eclipse.googlecode.com/svn/trunk/ | Java | 639 lines
                    
1package org.codehaus.groovy.eclipse.core.compiler;
                    
2
                    
44import org.codehaus.groovy.eclipse.core.GroovyCore;
                    
45import org.codehaus.groovy.eclipse.core.compiler.internal.CSTParserPluginFactory;
                    
46import org.codehaus.groovy.eclipse.core.compiler.internal.ErrorRecoveredCSTParserPluginFactory;
                    
46import org.codehaus.groovy.eclipse.core.compiler.internal.ErrorRecoveredCSTParserPluginFactory;
                    
47import org.codehaus.groovy.eclipse.core.compiler.internal.ICSTReporter;
                    
48import org.codehaus.groovy.syntax.RuntimeParserException;
                    
                
TypeEvaluator.java http://groovy-eclipse.googlecode.com/svn/trunk/ | Java | 473 lines
                    
40import org.codehaus.groovy.eclipse.core.GroovyCore;
                    
41import org.codehaus.groovy.eclipse.core.compiler.GroovyCompiler;
                    
42import org.codehaus.groovy.eclipse.core.compiler.GroovyCompilerConfigurationBuilder;
                    
42import org.codehaus.groovy.eclipse.core.compiler.GroovyCompilerConfigurationBuilder;
                    
43import org.codehaus.groovy.eclipse.core.compiler.IGroovyCompilationReporter;
                    
44import org.codehaus.groovy.eclipse.core.compiler.IGroovyCompiler;
                    
44import org.codehaus.groovy.eclipse.core.compiler.IGroovyCompiler;
                    
45import org.codehaus.groovy.eclipse.core.compiler.IGroovyCompilerConfiguration;
                    
46import org.codehaus.groovy.eclipse.core.util.UnsupportedVisitException;
                    
                
mkvtops3mp4.py http://mkvtops3mp4.googlecode.com/svn/trunk/ | Python | 816 lines
                    
105		for line in p.stdout.readlines():
                    
106			if re.compile("command\ not\ found").search(line):
                    
107				changeDecodeStatus(-9, "Couldn't find executable: mp4creator")
                    
124		for line in p.stdout.readlines():
                    
125			if re.compile("command\ not\ found").search(line):
                    
126				changeDecodeStatus(-8, "Couldn't find executable: mp4creator")
                    
143		for line in p.stdout.readlines():
                    
144			if re.compile("command\ not\ found").search(line):
                    
145				changeDecodeStatus(-7, "Couldn't find executable: mp4creator")
                    
147
                    
148			if re.compile("failed\ assertion.+m_size").search(line):
                    
149				changeDecodeStatus(-7, 'Video track too large for mp4.  Split output into more pieces. ')
                    
185			for line in p.stdout.readlines():
                    
186				if re.compile("command\ not\ found").search(line):
                    
187					changeDecodeStatus(-6, "Couldn't find executable: ffmpeg")
                    
                
mock.py https://code.google.com/p/mock/ | Python | 2336 lines
                    
94    import re
                    
95    regex = re.compile(r'^[a-z_][a-z0-9_]*$', re.I)
                    
96    def _isidentifier(string):
                    
                
Text.py git://git.savannah.nongnu.org/dnt.git | Python | 400 lines
                    
78    # (after stripping out empty strings).
                    
79    wordsep_re = re.compile(
                    
80        r'(\s+|'                                  # any whitespace
                    
84    # This regex is for ANSI escape sequences
                    
85    ansi_re = re.compile(chr(27) + '\[[0-9;]*[m]')
                    
86
                    
88    # is US-ASCII only (and therefore English-only)
                    
89    sentence_end_re = re.compile(r'[%s]'              # lowercase letter
                    
90                                 r'[\.\!\?]'          # sentence-ending punct.
                    
153        if not self.break_ansi_escapes :
                    
154            self.wordsep_re = re.compile(
                    
155                r'(' + self.ansi_re.pattern + r'|'       # ANSI escape
                    
344
                    
345_whitespace_only_re = re.compile('^[ \t]+$', re.MULTILINE)
                    
346_leading_whitespace_re = re.compile('(^[ \t]*)(?:[^ \t\n])', re.MULTILINE)
                    
                
patch.py http://python-patch.googlecode.com/svn/trunk/ | Python | 962 lines
                    
201    # regexp to match start of hunk, used groups - 1,3,4,6
                    
202    re_hunk_start = re.compile("^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))?")
                    
203    
                    
                
.doxy2swig.py https://code.google.com/p/shogun-toolbox/ | Python | 451 lines
                    
78
                    
79        self.space_re = re.compile(r'\s+')
                    
80        self.lead_spc = re.compile(r'^(%feature\S+\s+\S+\s*?)"\s+(\S)')
                    
                
SchedaLavorazioneUtils.py http://promogest.googlecode.com/svn/trunk/ | Python | 507 lines
                    
136                # necessario risolvere (potrebbe creare problemi)
                    
137                re_str = re.compile('(^[0-2]?[0-9]$|^30$|^31$){1}')
                    
138                if re_str.match(str) and str != ('0'or '00'):
                    
153                #se fallisce quello sopra... questo ha poche speranze.
                    
154                re_str = re.compile('(^[0-1]?[0-9]$|^10$|^11$|^12$){1}')
                    
155                if re_str.match(str) and str != ('0'or '00'):
                    
                
checkmovie.py http://crazy-beaver.googlecode.com/svn/trunk/ | Python | 2505 lines
                    
319            #this will not download any reports that match the blacklist
                    
320            if re.compile(nzbmatrix_badreport, re.IGNORECASE).match(bad_report_id):
                    
321
                    
342                                #this will not download any reports that match the blacklist
                    
343                                if re.compile(nzbs_rss_badreport, re.IGNORECASE).match(bad_report_id):
                    
344                                        
                    
384                  #this will not download any reports that match the blacklist
                    
385                  if re.compile(eval(IndexSite + "_badreport"), re.IGNORECASE).match(bad_report_id):
                    
386                          
                    
487          #this is set to download only movies that match defined genre's
                    
488          if re.compile(GoodGenre, re.IGNORECASE).search(check_good_genre):
                    
489
                    
500            #this is set to ignore imdb filters for movies with defined directors
                    
501            if re.compile(FavDir, re.IGNORECASE).search(check_fav_director):
                    
502
                    
                
ReactionGroup.py https://code.google.com/p/permm/ | Python | 627 lines
                    
100    
                    
101    reaction_re = re.compile("(?P<reactants>.*)->\[(?P<rxn_type>[kj])\]\s*(?P<products>.*)")
                    
102
                    
102
                    
103    species_re = re.compile("(\s?(?P<sign>[+-])?\s?)?((?P<stoic>\d{0,1}(\.(\d{1,3}(E\d{2})?)?)?)\*)?(?P<name>[a-zA-Z]\w*)(?:[ +=]|$)+",re.M)
                    
104    
                    
                
Mechanism.py https://code.google.com/p/permm/ | Python | 609 lines
                    
19
                    
20_spc_def_re = re.compile(r'(?P<stoic>[-+]?[0-9]*\.?[0-9]+)(?P<atom>\S+)(?=\s*\+\s*)?')
                    
21_numre = re.compile('(\d+)')
                    
                
template.py http://uliweb.googlecode.com/svn/trunk/ | Python | 682 lines
                    
94def parse_arguments(text, key='with'):
                    
95    r = re.compile(r'\s+%s\s+' % key)
                    
96    k = re.compile(r'^\s*([\w][a-zA-Z_0-9]*\s*)=\s*(.*)')
                    
121
                    
122r_tag = re.compile(r'(\{\{.*?\}\})', re.DOTALL|re.M)
                    
123
                    
                
isapi_wsgi.py http://isapi-wsgi.googlecode.com/svn/trunk/ | Python | 564 lines
                    
96	def split(self, splitter=' ', maxsplit=0):
                    
97		pattern = re.compile(re.escape(splitter), re.I)
                    
98		return pattern.split(self, maxsplit)
                    
                
iplayer2.py http://xbmc-iplayerv2.googlecode.com/svn/trunk/ | Python | 1021 lines
                    
72
                    
73re_selfclose = re.compile('<([a-zA-Z0-9]+)( ?.*)/>', re.M | re.S)
                    
74
                    
193    # tag:bbc.co.uk,2008:PIPS:b00808sc
                    
194    r = re.compile('PIPS:([0-9a-z]{8})')
                    
195    matches = r.findall(entry_id)
                    
                
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
                    
                
head.py git://github.com/sbp/phenny.git | Python | 189 lines
                    
67
                    
68r_title = re.compile(r'(?ims)<title[^>]*>(.*?)</title\s*>')
                    
69r_entity = re.compile(r'&[A-Za-z0-9#]+;')
                    
                
MXMLCPlugin.as http://moonshineproject.googlecode.com/svn/trunk/ | ActionScript | 488 lines
                    
9	import com.moonshineproject.plugin.console.MarkupTextLineModel;
                    
10	import com.moonshineproject.plugin.core.compiler.CompilerEventBase;
                    
11	import com.moonshineproject.plugin.menu.vo.MenuItem;
                    
                
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'
                    
                
RaftCaptureProcessor.py http://raft.googlecode.com/svn/trunk/ | Python | 227 lines
                    
45        self.directory = directory
                    
46        self.re_nonprintable = re.compile('[^%s]' % re.escape('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ \t\n\r'))
                    
47        self.cut_count = cut_count # TODO: add max size as well
                    
                
BoostBuild.py http://miranda-dev.googlecode.com/svn/trunk/ | Python | 950 lines
                    
125def re_remove(sequence, regex):
                    
126    me = re.compile(regex)
                    
127    result = filter(lambda x: me.match(x), sequence)
                    
                
gcc.py http://miranda-dev.googlecode.com/svn/trunk/ | Python | 801 lines
                    
83
                    
84__machine_match = re.compile('^([^ ]+)')
                    
85__version_match = re.compile('^([0-9.]+)')
                    
                
build_system.py http://miranda-dev.googlecode.com/svn/trunk/ | Python | 882 lines
                    
151
                    
152_target_id_split = re.compile("(.*)//(.*)")
                    
153
                    
                
encoder.py http://wordmobi.googlecode.com/svn/trunk/ | Python | 434 lines
                    
8
                    
9ESCAPE = re.compile(r'[\x00-\x1f\\"\b\f\n\r\t]')
                    
10ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])')
                    
10ESCAPE_ASCII = re.compile(r'([\\"]|[^\ -~])')
                    
11HAS_UTF8 = re.compile(r'[\x80-\xff]')
                    
12ESCAPE_DCT = {
                    
                
trans_real.py http://nostrive.googlecode.com/svn/trunk/ | Python | 549 lines
                    
26# Format of Accept-Language header values. From RFC 2616, section 14.4 and 3.9.
                    
27accept_language_re = re.compile(r'''
                    
28        ([A-Za-z]{1,8}(?:-[A-Za-z]{1,8})*|\*)   # "en", "en-au", "x-y-z", "*"
                    
                
templates.py http://gh615.googlecode.com/svn/trunk/ | Python | 514 lines
                    
164
                    
165token_re = re.compile('%s|%s(?s)' % (
                    
166    r'[uU]?[rR]?("""|\'\'\')((?<!\\)\\\1|.)*?\1',
                    
168))
                    
169directive_re = re.compile(r'(?<!\\)<%(?:(#)|(py(?:thon)?\b)|'
                    
170                          r'(?:\s*(\w+))\s*)(.*?)\s*%>\n?(?s)')
                    
170                          r'(?:\s*(\w+))\s*)(.*?)\s*%>\n?(?s)')
                    
171escape_re = re.compile(r'\\\n|\\(\\|<%)')
                    
172namestart_chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_'
                    
                
s3c.py https://code.google.com/p/s3ql/ | Python | 708 lines
                    
31
                    
32XML_CONTENT_RE = re.compile('^application/xml(?:;\s+|$)', re.IGNORECASE)
                    
33
                    
                
SANagios.py http://save-simply-your-san.googlecode.com/svn/trunk/ | Python | 1481 lines
                    
133                    lines = output.splitlines()
                    
134		    regexp = re.compile(r"^(.*)(#$)", re.IGNORECASE) # prompt looks like : 'hostname#'
                    
135		    for line in lines:
                    
145		lines = output.splitlines()
                    
146		regexp = re.compile(r"(Name\:\s*)+(.*)$", re.IGNORECASE) # line looks like : 'Name:    hostname'
                    
147		for line in lines:
                    
157		if self.ssh_shell:
                    
158		    regexp = re.compile(r"^(.*)\:(.*)>", re.IGNORECASE) # prompt looks like : 'hostname:user>'
                    
159		else:
                    
159		else:
                    
160                    regexp = re.compile(r"^(.*switchName\:\s*)+(.*)$", re.IGNORECASE) # line looks like : 'switchName:    hostname'
                    
161		for line in lines:
                    
                
jabberbot.py https://code.google.com/p/ardj/ | Python | 563 lines
                    
49        setattr(func, '_jabberbot_command_name', name or func.__name__)
                    
50        setattr(func, '_jabberbot_command_re', pattern and re.compile(pattern))
                    
51        return func
                    
                
PyEmu.py http://pyemu.googlecode.com/svn/trunk/ | Python | 987 lines
                    
173        # 32 bit registers
                    
174        if re.compile('^E[A-X]{2}$', re.IGNORECASE).match(register):
                    
175            result = self.cpu.get_register32(register)
                    
177        # 16 bit registers
                    
178        elif re.compile('^[ABCD]X$', re.IGNORECASE).match(register):
                    
179            result = self.cpu.get_register16(register)
                    
181        # 8 bit registers
                    
182        elif re.compile('^[ABCD]{1,}[LH]{1}$', re.IGNORECASE).match(register):
                    
183            result = self.cpu.get_register8(register)
                    
185        # Segment registers
                    
186        elif re.compile('^[CSDEFG]{1}S$', re.IGNORECASE).match(register):
                    
187            result = self.cpu.get_register16(register)
                    
189        # Flags
                    
190        elif re.compile('^[CPAZSTIDPR]{1}F$', re.IGNORECASE).match(register) or register in ["IOPL","NT","VM","AC","VIF","VIP","ID"]:
                    
191            result = self.cpu.get_register8(register)
                    
                
twi_service.py http://twitalker.googlecode.com/svn/trunk/ | Python | 2270 lines
                    
188            elif(param[0]=='-s'):
                    
189                p = re.compile("p\d+$")
                    
190                if(p.match(param[-1].encode('utf-8'))):
                    
                
lex.py http://naoservice.googlecode.com/svn/trunk/ | Python | 1059 lines
                    
57# This regular expression is used to match valid token names
                    
58_is_identifier = re.compile(r'^[a-zA-Z0-9_]+$')
                    
59
                    
238             for i in range(len(lre)):
                    
239                  titem.append((re.compile(lre[i][0], lextab._lexreflags | re.VERBOSE), _names_to_funcs(lre[i][1], fdict)))
                    
240                  txtitem.append(lre[i][0])
                    
                
MySQLMassLoader.py https://code.google.com/p/rdfextras/ | Python | 791 lines
                    
16Any = None
                    
17VALUES_EXPR     = re.compile('.*VALUES (\(.*\))')
                    
18TABLE_NAME_EXPR = re.compile('INSERT INTO (\S*)\s+VALUES')
                    
                
SQLite.py https://code.google.com/p/rdfextras/ | Python | 573 lines
                    
35    """
                    
36    r = re.compile(expr)
                    
37    return r.match(item) is not None
                    
                
SPARQL.py https://code.google.com/p/rdfextras/ | Python | 458 lines
                    
45
                    
46BNODE_IDENT_PATTERN = re.compile('(?P<label>_\:[^\s]+)')
                    
47SPARQL_NS        = Namespace('http://www.w3.org/2005/sparql-results#')
                    
                
gametrailers_play.py http://dandar3-xbmc-addons.googlecode.com/svn/trunk/ | Python | 473 lines
                    
26		self.DEBUG                     = False
                    
27		self.PLAYER_URL_RE             = re.compile( ".*/player/(\d+).html" )
                    
28		self.EPISODE_BONUSROUND_URL_RE = re.compile( ".*/episode/bonusround/.*" )
                    
28		self.EPISODE_BONUSROUND_URL_RE = re.compile( ".*/episode/bonusround/.*" )
                    
29		self.BONUSROUND_PHP_URL_RE     = re.compile( ".*/bonusround.php\?ep=(\d+)" )
                    
30		self.VIDEO_URL_RE              = re.compile( ".*/video/(.+)?/(\d+)" )
                    
30		self.VIDEO_URL_RE              = re.compile( ".*/video/(.+)?/(\d+)" )
                    
31		self.GAMETRAILERS_TV_PLAYER_RE = re.compile( ".*/gametrailerstv_player.php?.*" )
                    
32		self.EPISODE_GAMETRAILER_TV_RE = re.compile( ".*/episode/gametrailers-tv/.*" )
                    
32		self.EPISODE_GAMETRAILER_TV_RE = re.compile( ".*/episode/gametrailers-tv/.*" )
                    
33		self.USER_MOVIES_URL_RE        = re.compile( ".*/usermovies/(\d+).html" )
                    
34		self.MOSES_MOVIES_THUMBS       = re.compile(".*/moses/moviesthumbs/(\d+)-.*")
                    
197		filename      = embed[ "flashvars" ][ 9: ]		
                    
198		url           = re.compile( "(.+?)&" ).search( filename ).group( 1 )
                    
199		
                    
                
punkt.py http://narorumo.googlecode.com/svn/trunk/ | Python | 1450 lines
                    
111
                    
112    re_boundary_realignment = re.compile(r'["\')\]}]+?(?:\s+|(?=--)|$)',
                    
113            re.MULTILINE)
                    
146        except AttributeError:
                    
147            self._re_word_tokenizer = re.compile(
                    
148                self._word_tokenize_fmt %
                    
178        except:
                    
179            self._re_period_context = re.compile(
                    
180                self._period_context_fmt %
                    
188
                    
189_re_non_punct = re.compile(r'[^\W\d]', re.UNICODE)
                    
190"""Matches token types that are not merely punctuation. (Types for
                    
299    # Note: [A-Za-z] is approximated by [^\W\d] in the general case.
                    
300    _RE_ELLIPSIS = re.compile(r'\.\.+$')
                    
301    _RE_NUMERIC = re.compile(r'^-?[\.,]?\d[\d,\.-]*\.?$')
                    
                
__init__.py http://parsedatetime.googlecode.com/svn/trunk/ | Python | 2008 lines
                    
146    __tzd_re = '(?P<tzd>[-+](?P<tzdhours>\d\d)(?::?(?P<tzdminutes>\d\d))|Z)'
                    
147    __tzd_rx = re.compile(__tzd_re)
                    
148    __time_re = ('(?P<hours>\d\d)(?P<tsep>:|)(?P<minutes>\d\d)'
                    
151    __datetime_re = '%s(?:T%s)?' % (__date_re, __time_re)
                    
152    __datetime_rx = re.compile(__datetime_re)
                    
153    m = __datetime_rx.match(dateString)
                    
                
doctest_driver.py http://nltk.googlecode.com/svn/trunk/ | Python | 1020 lines
                    
107class MyDocTestParser(DocTestParser):
                    
108    PYLISTING_RE = re.compile(r'''
                    
109       (^\.\.[ ]*pylisting::.*\n         # directive
                    
114    # [xx] not used: split-pysrc_into_statements is used instead!
                    
115    PYLISTING_EX = re.compile(r'''
                    
116        (?:^[^ ].*\n                       # non-blank line
                    
120
                    
121    DOCTEST_OPTION_RE = re.compile(r'''
                    
122        ^[ ]*:\w+:.*\n                     # :option:
                    
                
dependencygraph.py http://nltk.googlecode.com/svn/trunk/ | Python | 519 lines
                    
127        """
                    
128        SPC = re.compile(' +')
                    
129        return re.sub(SPC, '\t', line).strip()
                    
                
util.py http://nltk.googlecode.com/svn/trunk/ | Python | 413 lines
                    
95##########################################
                    
96_VAL_SPLIT_RE = re.compile(r'\s*=+>\s*')
                    
97_ELEMENT_SPLIT_RE = re.compile(r'\s*,\s*')
                    
97_ELEMENT_SPLIT_RE = re.compile(r'\s*,\s*')
                    
98_TUPLES_RE = re.compile(r"""\s*         
                    
99                                (\([^)]+\))  # tuple-expression
                    
                
isri.py http://nltk.googlecode.com/svn/trunk/ | Python | 311 lines
                    
62
                    
63        self.re_short_vowels = re.compile(ur'[\u064B-\u0652]')
                    
64        self.re_hamza = re.compile(ur'[\u0621\u0624\u0626]')
                    
64        self.re_hamza = re.compile(ur'[\u0621\u0624\u0626]')
                    
65        self.re_intial_hamza = re.compile(ur'^[\u0622\u0623\u0625]')
                    
66
                    
                
cfg.py http://nltk.googlecode.com/svn/trunk/ | Python | 777 lines
                    
146    ARROW = SymbolWidget.SYMBOLS['rightarrow']
                    
147    _LHS_RE = re.compile(r"(^\s*\w+\s*)(->|("+ARROW+"))")
                    
148    _ARROW_RE = re.compile("\s*(->|("+ARROW+"))\s*")
                    
148    _ARROW_RE = re.compile("\s*(->|("+ARROW+"))\s*")
                    
149    _PRODUCTION_RE = re.compile(r"(^\s*\w+\s*)" +              # LHS
                    
150                                "(->|("+ARROW+"))\s*" +        # arrow
                    
151                                r"((\w+|'[\w ]*'|\"[\w ]*\"|\|)\s*)*$") # RHS
                    
152    _TOKEN_RE = re.compile("\\w+|->|'[\\w ]+'|\"[\\w ]+\"|("+ARROW+")")
                    
153    _BOLD = ('helvetica', -12, 'bold')
                    
                
toolbox.py http://nltk.googlecode.com/svn/trunk/ | Python | 496 lines
                    
60        # discard a BOM in the first line
                    
61        first_line_pat = re.compile(line_regexp % u'(?:\ufeff)?'.encode('utf8'))
                    
62        line_pat = re.compile(line_regexp % '')
                    
110            raise ValueError, 'unicode_fields is set but not encoding.'
                    
111        unwrap_pat = re.compile(r'\n+')
                    
112        for mkr, val in self.raw_fields():
                    
262
                    
263_is_value = re.compile(r"\S")
                    
264
                    
                
regexp.py http://nltk.googlecode.com/svn/trunk/ | Python | 1366 lines
                    
66    _CHINK = r'(%s+?)+?' % CHUNK_TAG
                    
67    _VALID = re.compile(r'^(\{?%s\}?)*?$' % CHUNK_TAG)
                    
68    _BRACKETS = re.compile('[^\{\}]+')
                    
68    _BRACKETS = re.compile('[^\{\}]+')
                    
69    _BALANCED_BRACKETS = re.compile(r'(\{\})*$')
                    
70    
                    
290        if isinstance(regexp, basestring):
                    
291            regexp = re.compile(regexp)
                    
292        self._repl = repl
                    
                
xmldocs.py http://nltk.googlecode.com/svn/trunk/ | Python | 381 lines
                    
139        
                    
140        self._tagspec = re.compile(tagspec+r'\Z')
                    
141        """The tag specification for this corpus view."""
                    
197    #: contain any un-closed tags.
                    
198    _VALID_XML_RE = re.compile(r"""
                    
199        [^<]*
                    
210    #: end tag, or empty-elt tag string.
                    
211    _XML_TAG_NAME = re.compile('<\s*/?\s*([^\s>]+)')
                    
212
                    
216    #: spec does not.
                    
217    _XML_PIECE = re.compile(r"""
                    
218        # Include these so we can skip them:
                    
                
verbnet.py http://nltk.googlecode.com/svn/trunk/ | Python | 391 lines
                    
42
                    
43    _LONGID_RE = re.compile(r'([^\-\.]*)-([\d+.\-]+)$')
                    
44    """Regular expression that matches (and decomposes) longids"""
                    
45    
                    
46    _SHORTID_RE = re.compile(r'[\d+.\-]+$')
                    
47    """Regular expression that matches shortids"""
                    
48    
                    
49    _INDEX_RE = re.compile(r'<MEMBER name="\??([^"]+)" wn="([^"]*)"[^>]+>|'
                    
50                           r'<VNSUBCLASS ID="([^"]+)"/?>')
                    
                
marshalbrill.py http://nltk.googlecode.com/svn/trunk/ | Python | 1232 lines
                    
117        """
                    
118        rule_a = re.compile(r"^(.+) -> (.+) if the (.+) of words i([+-]\d+)...i([+-]\d+) is '(.+)'$", re.UNICODE)
                    
119        rule_b = re.compile(r"^(.+) -> (.+) if the (.+) of the (.+) word is '(.+)'$", re.UNICODE)
                    
                
muc.py http://nltk.googlecode.com/svn/trunk/ | Python | 592 lines
                    
54
                    
55_MUC6_DOC_RE = re.compile(
                    
56    r'\s*<DOC>\s*'
                    
70    r'</DOC>\s*', re.DOTALL | re.I | re.VERBOSE)
                    
71_MUC6_PARA_RE = re.compile('(<p>\s*(?P<para>.+?)\s*</p>?)+', re.DOTALL | re.I)
                    
72_MUC6_SENT_RE = re.compile('(<s>\s*(?P<sent>.+?)\s*</s>)+', re.DOTALL | re.I)    
                    
73
                    
74_MUC7_DOC_RE = re.compile(
                    
75    r'\s*<DOC>\s*'
                    
86    r'</DOC>\s*', re.DOTALL | re.I | re.VERBOSE)
                    
87_MUC7_PARA_RE = re.compile(r'\s*<p>\s*.+?\s*(<p>\s*.+?\s*?)*\s*', re.DOTALL | re.I)
                    
88_MUC7_PARA_SPLIT_RE = re.compile(r'\s*<p>\s*', re.DOTALL | re.I)
                    
89
                    
90_MUC_NE_B_RE = re.compile('<(ENAMEX|NUMEX|TIMEX)\s+[^>]*?TYPE="(?P<type>\w+)"', re.DOTALL | re.I)
                    
91_MUC_NE_E_RE = re.compile('</(ENAMEX|NUMEX|TIMEX)>', re.DOTALL | re.I)
                    
                
lpath.py http://nltk.googlecode.com/svn/trunk/ | Python | 1044 lines
                    
51def tokenize(q):
                    
52    p = re.compile(r"\s*({|}|\[|]|//|/|\.|\\\\|\\|<==|==>|<=|=>|<--|-->|<-|->|@|or|and|not|\(|\)|>=|=|<>|like|_|\*|\+|\?)\s*")
                    
53
                    
                
concord.py http://nltk.googlecode.com/svn/trunk/ | Python | 868 lines
                    
224        # compile the middle regexp.
                    
225        reg = re.compile(middleRegexp)
                    
226
                    
                
textgrid.py http://nltk.googlecode.com/svn/trunk/ | Python | 654 lines
                    
93
                    
94OOTEXTFILE = re.compile(r"""(?x)
                    
95            xmin\ =\ (.*)[\r\n]+
                    
99
                    
100CHRONTEXTFILE = re.compile(r"""(?x)
                    
101            [\r\n]+(\S+)\ 
                    
105
                    
106OLDOOTEXTFILE = re.compile(r"""(?x)
                    
107            [\r\n]+(\S+)
                    
173        if self.text_type == "ChronTextFile":
                    
174            m = re.compile(header)
                    
175            tier_headers = m.findall(self.read_file)
                    
184        tier_re = header + "[\s\S]+?(?=" + header + "|$$)"
                    
185        m = re.compile(tier_re)
                    
186        tier_iter = m.finditer(self.read_file)
                    
                
nltk.etree.ElementTree-module.html http://nltk.googlecode.com/svn/trunk/ | HTML | 609 lines
                    
303          <td><span class="summary-sig"><a name="_encode_entity"></a><span class="summary-sig-name">_encode_entity</span>(<span class="summary-sig-arg">text</span>,
                    
304        <span class="summary-sig-arg">pattern</span>=<span class="summary-sig-default">re.compile(r'<code class="re-group">[</code>&amp;&lt;&gt;&quot;\x80<code class="re-op">-</code>\uffff<code class="re-group">]</code><code class="re-op">+</code>')</span>)</span></td>
                    
305          <td align="right" valign="top">
                    
                
nltk.corpus.reader.propbank.PropbankInflection-class.html http://nltk.googlecode.com/svn/trunk/ | HTML | 468 lines
                    
199    </td><td class="summary">
                    
200        <a name="_VALIDATE"></a><span class="summary-name">_VALIDATE</span> = <code title="re.compile(r'[igpv-][fpn-][pob-][3-][ap-]$')">re.compile(r'<code class="re-group">[</code>igpv-<code class="re-group">]</code><code class="re-group">[</code>fpn-<code class="re-group">]</code><code class="re-group">[</code>pob-<code class="re-group">]</code><code class="re-group">[</code>3-<code class="re-group">]</code><code class="re-group">[</code>ap-<code class="re-group">]</code>$')</code>
                    
201    </td>
                    
                
chart_fs.py http://nltk.googlecode.com/svn/trunk/ | Python | 655 lines
                    
130            #e.g. <a b c>=<d e f>
                    
131            r = re.compile('<(.+)>\s*=\s*<(.+)>')
                    
132            m = r.match(s)
                    
145                #e.g. <a b c>=some_value
                    
146                r = re.compile('<(.+)>\s*=\s*(.+)') 
                    
147                m = r.match(s)
                    
                
 

Source

Language