Regular Expressions - Remove everything after the "/"

I have a database with thousands of lines of products in it.  The data in a particular row has become somehow merged with data from a second table and it should not be that way. These are book titles, and the series in which the books are assigned has been added.  They are separated by a slash.

For example:

"Batman" reads like this:
"Batman / League of Justice Friends"

or

"Strawberry Shortcake" reads like this:
"Strawberry Shortcake / Early Readers K-3"

What I need to do is run a regular expressions in the sql dump, that will remove the "/" in the product title and everything after the slash, leaving just the book title.

Thanks in advance for any assistance.
mcpilot1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mcpilot1Author Commented:
Quick update - in the sql row, additional info still exists which will need to be left intact - product description, price, etc.  Here is a sample row:

'Giraffe (14) / Giant Animals', 'Dive into this colorful title featuring one of the biggest

..where 'Dive into..." begins the description. The product name is the first field in the table and is enclosed with a ' and separated from the description with a comma.
0
Dan CraciunIT ConsultantCommented:
Search for
^('.*?)(\s*/.*?)(',.*?)$

Replace with
$1$3

HTH,
Dan
0
mcpilot1Author Commented:
No luck yet - screen shot attached w/ the attempt in Notepad ++.  Any thoughts?

regex.png
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Dan CraciunIT ConsultantCommented:
Yeah: post the full strings when asking for a solution.
On the sample you posted, the line started with 'Giraffe...

Try searching for this:
^(\(\d+,\s*'.*?)(\s*/.*?)(',.*?)$

The replacement string is the same.

Oh, and uncheck ". matches newline"

notepad
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mcpilot1Author Commented:
perfect. Thank you.
0
Dan CraciunIT ConsultantCommented:
You're welcome.

Glad I could help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Regular Expressions

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.