From 00f1b7fb848a297f76a6f05dccfbf90a4dbf2d0f Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 24 Nov 2011 11:19:34 +1100 Subject: [PATCH] ReST edits --- README.rst | 8 +++----- parse.py | 4 +++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 37f512d..a3b66ff 100644 --- a/README.rst +++ b/README.rst @@ -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') +.. 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(">{}<", "

some bold text

") diff --git a/parse.py b/parse.py index 3faf77b..98c8415 100644 --- a/parse.py +++ b/parse.py @@ -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') +.. 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(">{}<", "

some bold text

")