|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/22697/root/usr/lib64/python2.4/ |
Upload File : |
mò
‚=5Dc @ sÿ d Z d k Z e i d d e e d d ƒd k Z d k Td d g Z h d d
<d d
<d d
<d d <d d <d d <d d <d d <d d <d d <d d <d d <d d <Z d d „ Z
d d „ Z d „ Z e d j o e ƒ n d S( s“ Convert old ("regex") regular expressions to new syntax ("re").
When imported as a module, there are two functions, with their own
strings:
convert(s, syntax=None) -- convert a regex regular expression to re syntax
quote(s) -- return a quoted string literal
When used as a script, read a Python string literal (or any other
expression evaluating to a string) from stdin, and write the
translated expression to stdout as a string literal. Unless stdout is
a tty, no trailing \n is written to stdout. This is done so that it
can be used with Emacs C-U M-| (shell-command-on-region with argument
which filters the region through the shell command).
No attempt has been made at coding for performance.
Translation table...
\( ( (unless RE_NO_BK_PARENS set)
\) ) (unless RE_NO_BK_PARENS set)
\| | (unless RE_NO_BK_VBAR set)
\< \b (not quite the same, but alla...)
\> \b (not quite the same, but alla...)
\` \A
\' \Z
Not translated...
.
^
$
*
+ (unless RE_BK_PLUS_QM set, then to \+)
? (unless RE_BK_PLUS_QM set, then to \?)
\
\b
\B
\w
\W
\1 ... \9
Special cases...
Non-printable characters are always replaced by their 3-digit
escape code (except \t, \n, \r, which use mnemonic escapes)
Newline is turned into | when RE_NEWLINE_OR is set
XXX To be done...
[...] (different treatment of backslashed items?)
[^...] (different treatment of backslashed items?)
^ $ * + ? (in some error contexts these are probably treated differently)
\vDD \DD (in the regex docs but only works when RE_ANSI_HEX set)
Nt ignores .* regex .*t appendi ( t *t convertt quotes \<s \bs \>s \`s \As \'s \Zs \(t (s \)t )s \|t |s s \ts
s \ns
s \rc C sm t i ƒ } | d j o t i ƒ } n | t @o | d =| d =| d =| d =n | t @o | d =| d =n | t @o, d | d <d | d
<d | d <d
| d <n | t
@o d | d <n d } d
} t
| ƒ } x | | j o | | } | d } | d j o>