Tech Off Thread

3 posts

Best way to find a "string"

Back to Forum: Tech Off
  • User profile image

    Continuing on with my app...

    I'm loading the tweets I get into RichTextBox's (because it provides detectURL), and I'm looking at now trying to detect for replies (@'s)...I had thought about using a few different methods to find these and just asking for some opinions....

    Regex? Trim? Split? (I know in PHP you could explode)....suggestions?

  • User profile image

    It is pretty simple to do with regex with something like:


    It is also pretty easy to write something from scratch for this type of thing...

  • User profile image

    You could also use the Instr() function in VB.

    But if it's always going to start with "@", then just do a substring.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.