Your negative lookahead solution would e.g. be this:
\\(?:.(?!\\))+$
See it here on Regexr
Related Posts:
- Graphviz’s executables are not found (Python 3.4)
- Graphviz’s executables are not found (Python 3.4)
- How to fix ingress 404 default backend
- Graphviz’s executables are not found (Python 3.4)
- Setting up enviromental variables in Windows 10 to use java and javac
- Python can’t find my module
- How to change the Jupyter start-up folder
- Running python script inside ipython
- What is a Context Free Grammar?
- How can I validate an email address using a regular expression?
- Regular expression to match a line that doesn’t contain a word
- Difference between \b and \B in regex
- ‘git’ is not recognized as an internal or external command
- whitespace in regular expression
- How do I use a regex in a shell script?
- Regular Expression for alphanumeric and underscores
- Regular Expression for alphanumeric and underscores
- python re.split() to split by spaces, commas, and periods, but not in cases like 1,000 or 1.50
- What is a non-capturing group in regular expressions?
- What is a good regular expression to match a URL? [duplicate]
- Is there a difference between /\s/g and /\s+/g?
- I need an XPATH to extract data from www.gsmarena.com
- What is a non-capturing group in regular expressions?
- How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops
- Remove all special characters, punctuation and spaces from string
- How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops
- Grep and Python
- Using Bash regex match (=~) where regex includes quotes (” characters)
- How can I remove punctuation from input text in Java?
- Regex for string contains?
- What is the grep equivalent in Python?
- Python re.split() vs split()
- Relative paths in Python
- Relative paths in Python
- RegExp in TypeScript
- Regex for numbers only
- Negative matching using grep (match lines that do not contain foo)
- What does __FILE__ mean?
- How to validate phone number using PHP?
- Can a URL contain a semicolon and still be valid?
- How is \\n and \\\n interpreted by the expanded regular expression?
- Regular Expression to reformat a US phone number in Javascript
- Windows path in Python
- Using RegEx in SQL Server
- Remove all special characters from a string
- Regular Expressions on Punctuation
- Whitespace Matching Regex – Java
- How to change pip installation path
- Regex credit card number tests
- RegEx match open tags except XHTML self-contained tags
- Extract hostname name from string
- How to use regex in String.contains() method in Java
- /bb|[^b]{2}/ how does it work?
- How do I match any character across multiple lines in a regular expression?
- Regular expression to remove HTML tags from a string
- Python regex match space only
- Case insensitive regular expression without re.compile?
- RegEx: How can I match all numbers greater than 49?
- Regex empty string or email
- Regex difference: (\w+)? and (\w*)
- Regex multiple match substring
- Java regex email
- Unrecognized escape sequence for path string containing backslashes
- Retrieving all Links from a Post?
- sql query to put quotes around numbers in img tag
- Remove all categories from URL
- Adding Automatically To In WordPress Using Filter Referencing?
- How to change the admin menu “Pages” to something else
- add_rewrite_rule isnt working, not getting added to rules array, why?
- Get shortcode attribute outside of WordPress
- get_shortcode_regex() only matches first shortcode
- 404 regular-expression advice needed
- What’s the “?P” register rest api construct, what is for and where to find official docs?
- Custom rewrite_rules – only pass numbers and not alphabetic characters
- String regex match replace for role ‘contributor’ only
- Get URL from shortcode tag
- Adding span tags to post titles using regex
- Using preg_replace() with the_content filter
- Preg_Match(): compilation failed unknown property name
- php preg_match with multiple patterns
- Get array of shortcodes within string
- Can an RSS item be altered with a hook?
- How to deal with WordPress bug: can’t use wrapped and unwrapped shortcode on same post
- WordPress rewrite rule doesn’t work unless post category is explicitly called in regex
- Custom taxonomy terms as children of multiple custom post types
- add_rewrite_rule with optional parameters
- Media Library Cleanup A Thought Exercise
- ACF – Eliminate unnecessary data and print
- Rewrite rule regex help required
- Remove Custom HTML Posts Using Regex
- WP_Query Regexp whitespace and end of string
- Redirect files in uploads directory if WordPress user not logged in
- How to get different html tags from the content using regex?
- WordPress Own Rewrite Rules
- WordPress add_rewrite_rule
- Call Shortcode Attribute Value within another function
- Rewrite permalink to include multiple taxonomies
- Dynamically append custom post type to end of url
- How do I set the global PATH environment variable on OS X?
- Adding a directory to $PATH in CentOS?