Skip to content
Advertisement

Variable length substring between two characters

Data looks like this:

I want it to look like this:

It’s pretty simple to get rid of one or the other.

This:

Gives me this: Initiative: Credible Sources Initiative: Just in Time Initiative: Database Normalization

And this:

Gives me this:

Having a hard time figuring out how to combine the two.

Advertisement

Answer

How about just using substring()?

Or, if you don’t know how long the prefix is:

Here is a db<>fiddle.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement