File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ You can also search for groups of regular expressions using parentheses.
3535``` tut
3636import scala.util.matching.Regex
3737
38- val keyValPattern: Regex = "([0-9a-zA-Z-#() ]+): ([0-9a-zA-Z-#() ]+)".r
38+ val keyValPattern: Regex = "([0-9a-zA-Z- ]+): ([0-9a-zA-Z-#()/. ]+)".r
3939
4040val input: String =
4141 """background-color: #A03300;
@@ -53,7 +53,7 @@ for (patternMatch <- keyValPattern.findAllMatchIn(input))
5353Here we parse out the keys and values of a String. Each match has a group of sub-matches. Here is the output:
5454```
5555key: background-color value: #A03300
56- key: background-image value: url(img
56+ key: background-image value: url(img/header100.png)
5757key: background-position value: top center
5858key: background-repeat value: repeat-x
5959key: background-size value: 2160px 108px
You can’t perform that action at this time.
0 commit comments