Fixed examples in the documentation of module re (proc replace and proc replacef)
This commit is contained in:
parent
b1656f2db4
commit
12e4a62b44
1 changed files with 2 additions and 2 deletions
|
|
@ -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:
|
||||
##
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue