Merge pull request #2262 from jobe2015/re-replace-doku

Fixed examples in the documentation of module re
This commit is contained in:
Andreas Rumpf
2015-03-04 16:39:55 +01:00

View File

@@ -291,7 +291,7 @@ proc replace*(s: string, sub: Regex, by = ""): string =
## accessed in `by`. Examples:
##
## .. code-block:: nim
## "var1=key; var2=key2".replace(re"(\w+)'='(\w+)")
## "var1=key; var2=key2".replace(re"(\w+)=(\w+)")
##
## Results in:
##
@@ -313,7 +313,7 @@ proc replacef*(s: string, sub: Regex, by: string): string =
## with the notation ``$i`` and ``$#`` (see strutils.`%`). Examples:
##
## .. code-block:: nim
## "var1=key; var2=key2".replacef(re"(\w+)'='(\w+)", "$1<-$2$2")
## "var1=key; var2=key2".replacef(re"(\w+)=(\w+)", "$1<-$2$2")
##
## Results in:
##