I have a field in my database that I'm returning to a variable. I know how to do a replace so that isn't my question. What I need to know is how to use a regex to search a text string for certain characters and if that series of characters is found, I want to set a variable to a specific numeric value. Here is an example of what the text will look like:
052 - Dallas/Marketing/Internet
028 - Dallas/Marketing/Media
096 - Dallas/Marketing/Printing
087 - Dallas/Advertising
024 - Dallas/Administration/Assistants
057 - Dallas/Executive/CEO
What I want to do (for sake of example) is anytime I find the word Marketing no matter what is around it, set the value of X to 1.
...
Go to the complete details ...