Regexp docs typo fix

db4
Daniel Ehrenberg 2009-03-17 00:10:55 -05:00
parent 4a79ee9bb9
commit a181c22015
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ ARTICLE: { "regexp" "intro" } "A quick introduction to regular expressions"
{ $code "R/ (f|b)oo+/ \"bar\" re-replace" }
"To search a file for all lines that match a given regular expression, you could use code like this:"
{ $code <" "file.txt" ascii file-lines [ R/ (f|b)oo+/ re-contains? ] filter "> }
"To test if a string in its entirity matches a regular expression, the following can be used:"
"To test if a string in its entirety matches a regular expression, the following can be used:"
{ $example <" USING: regexp prettyprint ; "fooo" R/ (b|f)oo+/ matches? . "> "t" }
"Regular expressions can't be used for all parsing tasks. For example, they are not powerful enough to match balancing parentheses." ;