PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Don't like ads?
PRO users
don't see any ads ;-)
Public Pastes
Untitled
1 sec ago
Untitled
6 sec ago
Untitled
9 sec ago
asda
11 sec ago
Untitled
11 sec ago
Untitled
C# | 24 sec ago
Untitled
17 sec ago
Untitled
19 sec ago
Untitled
By: a guest on
May 14th, 2012
| syntax:
None
| size: 0.17 KB | hits: 19 | expires: Never
download
|
raw
|
embed
|
report abuse
|
print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
>>> import re
>>> COMMIT_RE = re.compile(r'(?:^|(\s))r(\d+)')
>>> COMMIT_RE.search("wr0ngway")
>>> COMMIT_RE.search("r123")
<_sre.SRE_Match object at 0x7fa507d56c68>
create a
new version
of this paste
RAW Paste Data
>>> import re >>> COMMIT_RE = re.compile(r'(?:^|(\s))r(\d+)') >>> COMMIT_RE.search("wr0ngway") >>> COMMIT_RE.search("r123") <_sre.SRE_Match object at 0x7fa507d56c68>