title: Applescript: trim spaces and return line
body: <p>I wrote an AppleScript that returns a random string from a text file delineated by commas:</p>
  
  <pre><code>set some_file to "Macintosh HD:Users:Zade:Library:Application Support:Notational Data:Words.txt" as alias
  set the_text to read some_file as string
  set the text item delimiters of AppleScript to ", "
  set the_lines to (every text item of the_text)
  return some item of the_lines
  </code></pre>
  
  <p>But I now have a text file delineated by new lines instead of commas. And each line begins with anywhere from 0-20 spaces. I want to return just the text portion of a random line. How do I do this?</p>
  
  <p>Also, if the text portion is surrounded by plain (not curly) quotes, how can I trim the quotes?</p>