Trying to get the last part of a URL with Regex

Created on 5 December 2019, over 5 years ago
Updated 17 May 2023, almost 2 years ago

Hi,

I'm trying to get search 404 going with a regular expression that would match anything after the last slash in my URL, as the first few components of my URL shouldn't be searched for.
Example below, I want to search for only 'url-alias-of-the-article'

http://example.com/lifestyle/article/url-alias-of-the-article

In another issue from drupal 6, they recommend to use this: ^(.*[\\\/])

But that is not working when entered in the PCRE filter field.

πŸ’¬ Support request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tepelena

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024