Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
22
Task/Regular-expressions/Lasso/regular-expressions.lasso
Normal file
22
Task/Regular-expressions/Lasso/regular-expressions.lasso
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
local(mytext = 'My name is: Stone, Rosetta
|
||||
My name is: Hippo, Campus
|
||||
')
|
||||
|
||||
local(regexp = regexp(
|
||||
-find = `(?m)^My name is: (.*?), (.*?)$`,
|
||||
-input = #mytext,
|
||||
-replace = `Hello! I am $2 $1`,
|
||||
-ignorecase
|
||||
))
|
||||
|
||||
|
||||
while(#regexp -> find) => {^
|
||||
#regexp -> groupcount > 1 ? (#regexp -> matchString(2) -> trim&) + '<br />'
|
||||
^}
|
||||
|
||||
#regexp -> reset(-input = #mytext)
|
||||
#regexp -> findall
|
||||
|
||||
#regexp -> reset(-input = #mytext)
|
||||
'<br />'
|
||||
#regexp -> replaceall
|
||||
Loading…
Add table
Add a link
Reference in a new issue