Words containing "the" substring: Difference between revisions
m
→{{header|AppleScript}}: Minor comment edits.
m (→{{header|AppleScript}}: Minor preamble edit.) |
m (→{{header|AppleScript}}: Minor comment edits.) |
||
Line 129:
<lang applescript>on wordsContaining(textFile, searchText, minLength)
-- Set up and execute a shell script which uses grep to find words containing the search text
-- (matching
-- satisfy the
if ("A" = "a") then
set part1 to "grep -io "
Line 157:
set theWords to theText's componentsSeparatedByString:(linefeed)
-- Filter the resulting array for strings which meet the search text and minimum length requirements,
-- matching
-- code units so use regex to check the lengths in characters.
if ("A" = "a") then
|