Displaying page
of
pages;
Items to
Title |
Test
Details
Relative paths in HTML
|
Expression |
(<(?:.*?)\s)href\s*=([\s"'])*/?([^\2:#]+?)\2((?:.*?)>)
|
Description |
This expression matches all HREF relative paths, but not full URLs or dead # links. It can be used for selecting paths that need to be updated in HTML that has replaced from its original page onto a new one. It matches the entire containing tag with the following groups: 1 - the start of the containing tag through the space before the attribute, 2 - the delimiter between the attribute's equal sign and its value (e.g. a double quote), 3 - the attribute value, 4 - the remainder of the tag after the closing attribute value delimiter.
|
Matches |
<a href="joe's test.htm" /> | <a href='/test2.htm'> | <a href = test2.htm />
|
Non-Matches |
<a href="http://www.test.com/test.htm" /> | <a href = '#' />
|
Author |
Rating:
Not yet rated.
Joe Theriault
|
Displaying page
of
pages;
Items to