Fixed examples in the documentation of module re (proc replace and proc replacef)

This commit is contained in:
Johanna Berewinkel
2015-03-04 09:05:30 +01:00
parent b1656f2db4
commit 12e4a62b44

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:
##