Text Between Strings

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TVining
    New Member
    • Dec 2007
    • 26

    Text Between Strings

    I want to remove all text in a single field that matches "Army & Air Force Hometown News
    News Release

    123 System St. (210)123-3333 Fax: (210)123-2222
    San Antonio, TX 78226-1848 EMail: hometown@NEWDOM AIN.COM

    For immediate release.
    "
    Basically, everything before and including "FOR IMMEDIATE RELEASE" and also Anything after and including "NOTE TO EDITOR".

    Simple way to put it: Only keep text between "FOR IMMEDIATE RELEASE" and NOTE TO EDITOR"

    Thanks,
    TV
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    Use MySQL's string functions to accomplish this e.g. SUBSTRING() and SUBSTRING_INDEX ().

    Comment

    • TVining
      New Member
      • Dec 2007
      • 26

      #3
      Okay, I see.

      Do you have an example? Not asking anyone to write it for me, but I need a little more... What command do I use to remove the unwanted text.

      Thanks,
      TV

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by TVining
        Okay, I see.

        Do you have an example? Not asking anyone to write it for me, but I need a little more... What command do I use to remove the unwanted text.

        Thanks,
        TV
        Open the link posted above and read it. It has an example for almost every mysql string function.

        Comment

        Working...