I’m trying to return MySQL records where they don’t end in a specific way but I’m having trouble getting what I want (and describing it to be honest).
The records are URL’s of the following format:
/artist/all/page666 (Do return)
/artist/foo-fighters/page666 (Don't return)
/albums (Do return)
/albums/page666 (Don't return)
So I do want records that end in all/page666 but I don’t want ones that end in any_word_other_than_all/page666.
Using
LIKE '%all/page%'
would get me half way there but it won’t include anything like
/albums
/vinyl
So if I have a REGEXP that excludes any_word_other_than_all/page[int], I would get everything I want.
I’d appreciate any help!
Something like this? (first thing that comes to mind..)