tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
3
Task/Regular-expressions/R/regular-expressions-1.r
Normal file
3
Task/Regular-expressions/R/regular-expressions-1.r
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
pattern <- "string"
|
||||
text1 <- "this is a matching string"
|
||||
text2 <- "this does not match"
|
||||
1
Task/Regular-expressions/R/regular-expressions-2.r
Normal file
1
Task/Regular-expressions/R/regular-expressions-2.r
Normal file
|
|
@ -0,0 +1 @@
|
|||
grep(pattern, c(text1, text2)) # 1
|
||||
1
Task/Regular-expressions/R/regular-expressions-3.r
Normal file
1
Task/Regular-expressions/R/regular-expressions-3.r
Normal file
|
|
@ -0,0 +1 @@
|
|||
regexpr(pattern, c(text1, text2))
|
||||
1
Task/Regular-expressions/R/regular-expressions-4.r
Normal file
1
Task/Regular-expressions/R/regular-expressions-4.r
Normal file
|
|
@ -0,0 +1 @@
|
|||
gsub(pattern, "pair of socks", c(text1, text2))
|
||||
Loading…
Add table
Add a link
Reference in a new issue