Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -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

View file

@ -0,0 +1,3 @@
True
(R2D2,C3P0)
This is a story about R2D2 and Luke who are best friends.

View file

@ -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

View file

@ -0,0 +1,3 @@
Potter, Harry 98951212
Granger, Hermione 59867125
Weasley, Ron 56471832