ReST edits

This commit is contained in:
Richard Jones
2011-11-24 11:19:34 +11:00
parent fcb610580e
commit 00f1b7fb84
2 changed files with 6 additions and 6 deletions
+3 -5
View File
@@ -14,13 +14,11 @@ From there it's a simple thing to parse a string:
Or to search a string for some pattern:
>>> search('Age: {:d}
', 'Name: Rufus
Age: 42
Color: red
')
>>> search('Age: {:d}\n', 'Name: Rufus\nAge: 42\nColor: red\n')
<Result (42,) {}>
.. please excuse the double-backslash in that example; it's a ReST work-around
Or find all the occurrances of some pattern in a string:
>>> ''.join(r.fixed[0] for r in findall(">{}<", "<p>some <b>bold</b> text</p>")
+3 -1
View File
@@ -14,9 +14,11 @@ From there it's a simple thing to parse a string:
Or to search a string for some pattern:
>>> search('Age: {:d}\n', 'Name: Rufus\nAge: 42\nColor: red\n')
>>> search('Age: {:d}\\n', 'Name: Rufus\\nAge: 42\\nColor: red\\n')
<Result (42,) {}>
.. please excuse the double-backslash in that example; it's an ReST work-around
Or find all the occurrances of some pattern in a string:
>>> ''.join(r.fixed[0] for r in findall(">{}<", "<p>some <b>bold</b> text</p>")