title: autocomplete middle of a textarea selector javascript jquery
body: <p>I have seen how to have multiple autocompletes in a single textarea, but what I want to due is have something that can select a term in the middle of the textarea, or more precisely wherever the cursor is/was in the textarea.  Most solutions I have seen only work if the user is working on the end of the input string.  I would like to have something along the lines of being able to start with the string:
    "@George stepped on #foot."
  then go back to the middle of the string and start typing to change it to this:
    "@George stepped on @Fredrick's #foot. according to @Mary"
  and have @Fredrick and @Mary each separately show up as an autocomplete option.</p>
  
  <p>for the specific use I want this functionality for, the autocomplete will happen on character strings that start with either a "@" or a "#" symbol, but they will not necessarily be the first or last of the given symbol. </p>
  
  <p>I am using javascript and jquery-ui for this task. this is for use on mobile devices so the position of the autocomplete will always just be at the bottom of the text area.</p>