Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
set text to "This is a story about R2D2 and C3P0 who are best friends."
|
||||
set pattern to <word start, letter, digit, letter, digit, word end>
|
||||
|
||||
put the sixth word of text matches pattern -- (note: the sixth word is "R2D2")
|
||||
|
||||
put every occurrence of pattern in text
|
||||
|
||||
replace the second occurrence of pattern in text with "Luke"
|
||||
put text
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
True
|
||||
(R2D2,C3P0)
|
||||
This is a story about R2D2 and Luke who are best friends.
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
set phoneList to {{
|
||||
Harry Potter 98951212
|
||||
Hermione Granger 59867125
|
||||
Ron Weasley 56471832
|
||||
|
||||
}}
|
||||
|
||||
set wordPattern to <word start, characters, word end>
|
||||
set namePattern to <start of line, {firstName: wordPattern}, space, {lastName: wordPattern}>
|
||||
|
||||
replace every occurrence of namePattern in phoneList with "{:lastName}, {:firstName} –"
|
||||
put phoneList
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
Potter, Harry – 98951212
|
||||
Granger, Hermione – 59867125
|
||||
Weasley, Ron – 56471832
|
||||
Loading…
Add table
Add a link
Reference in a new issue