In original question, just a backslash
is needed before slash
, in this case regex will get everything after last slash
in the string
([^\/]+$)
More Related Contents:
- Regular expression [ 1 ( 0 1* 0)* 1 ]* DFA
- subdomain htaccess rediect with query string
- Can regular expressions be used to match nested patterns? [duplicate]
- Regex to pick characters outside of pair of quotes
- Match whitespace but not newlines
- Find ‘word’ not followed by a certain character
- Regex to split a CSV
- How can I match nested brackets using regex?
- How do I grep for all non-ASCII characters?
- How to match Cyrillic characters with a regular expression
- Random string that matches a regexp [duplicate]
- Negative matching using grep (match lines that do not contain foo)
- (grep) Regex to match non-ASCII characters?
- Remove all special characters from a string in R?
- Regular expression for validating names and surnames?
- Matching all words except one
- HTML5 Form Input Pattern Currency Format
- How to pattern match using regular expression in Scala?
- Oracle REGEXP_LIKE and word boundaries
- Convert dd/mm/yy and dd/mm/yyyy to Dates
- Regex: Matching by exclusion, without look-ahead – is it possible?
- Why can’t you use repetition quantifiers in zero-width look behind assertions?
- How can I exclude some characters from a class?
- What is the difference between \1 and $1 in a Perl regex?
- US Phone Number Verification
- How can I use a variable for a regex pattern without interpreting meta characters?
- Replace all whitespace with a line break/paragraph mark to make a word list
- Why do regex engines allow / automatically attempt matching at the end of the input string?
- How do I turn any regex into an complement of itself without complex hand editing?
- Apache mod_rewrite REDIRECT_STATUS condition causing directory listing