Skip to content

Commit 8eaf83c

Browse files
authored
doc: clean up some example regex expressions (#26931)
Remove some unnecessary parts of regex expressions used as examples in the docs.
1 parent a19fbac commit 8eaf83c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/src/manual/strings.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ of the substring that matches, but perhaps we want to capture any non-blank text
832832
character. We could do the following:
833833

834834
```jldoctest
835-
julia> m = match(r"^\s*(?:#\s*(.*?)\s*$|$)", "# a comment ")
835+
julia> m = match(r"^\s*(?:#\s*(.*?)\s*$)", "# a comment ")
836836
RegexMatch("# a comment ", 1="a comment")
837837
```
838838

@@ -981,10 +981,10 @@ x Tells the regular expression parser to ignore most whitespace
981981
For example, the following regex has all three flags turned on:
982982

983983
```jldoctest
984-
julia> r"a+.*b+.*?d$"ism
985-
r"a+.*b+.*?d$"ims
984+
julia> r"a+.*b+.*d$"ism
985+
r"a+.*b+.*d$"ims
986986
987-
julia> match(r"a+.*b+.*?d$"ism, "Goodbye,\nOh, angry,\nBad world\n")
987+
julia> match(r"a+.*b+.*d$"ism, "Goodbye,\nOh, angry,\nBad world\n")
988988
RegexMatch("angry,\nBad world")
989989
```
990990

0 commit comments

Comments
 (0)