RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Last word
Expression
\w*$
Description
Finds the last word in a string eg. the user in \\domain\user or the extension/file type in a file name.
Matches
\\domain\user
Non-Matches
I wan't lots of $$
Author Rating: Not yet rated. Thomas Nielsen
Source Brain
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Saxon regex does not allow zero occurence
Name: Donald B. Thomason
Date: 7/7/2007 8:22:45 AM
Comment:
Use \w+$


Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials