Other Resources:
End of string anchor $
What is the "end of string" anchor in a regular expression? How to use it?
How to write a regular expression using "end of string" anchor to validate words ending in 'z': quartz?
✍: FYIcenter.com
![]()
The "end of string" anchor is an atomic zero-width assertion specifing that the match must occur at the end of the string. The "end of string" anchor is represented as '$'. For example:
\w+day$ # matches strings of 'Monday', 'Tuesday', etc.
The regular expression to validate words ending in 'z':
\w+z$
\w+ - matches word characters 1 or more times
z - matches 'z'
$ - matches 'end of string'
2013-01-26, 0👍, 0💬
Popular Posts:
Are you having problems using regular expressions when processing text strings in your applications ...
How to capture the Baidu spider entries from Web log file? Here are some Web log file entries: 127.0...
How to write a regular expression to parse key-value entries from Windows .INI files? Here is an exa...
How to write a regular expression to validate GUID (Globally Unique IDentifier) or UUID (Universally...
How to write a regular expression to parse key-value entries from Windows .INI files? Here is an exa...