<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Regex - Search for Name of Current File]]></title><description><![CDATA[<p dir="auto">I want to write a regular expression that matches the name of the file currently being searched.</p>
<p dir="auto">The purpose is to find hyperlinks in an HTML file which point to the file itself, but without the # character in the href attribute.  Such links are almost always a mistake, but apps which look for broken links don’t find it, because the link isn’t broken (it points to its own file!).</p>
<p dir="auto">I Googled for this kind of regex, but the only hits returned were on how to extract file names from paths, which isn’t what I need.</p>
<p dir="auto">Is it possible to match the name of the current file in a regular expression?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24183/regex-search-for-name-of-current-file</link><generator>RSS for Node</generator><lastBuildDate>Wed, 16 Sep 2026 15:14:17 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24183.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 26 Feb 2023 17:10:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Regex - Search for Name of Current File on Sun, 26 Feb 2023 17:13:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sylvester-bullitt" aria-label="Profile: Sylvester-Bullitt">@<bdi>Sylvester-Bullitt</bdi></a> ,</p>
<p dir="auto">Sorry, the regex engine knows nothing about the “file metadata”, which includes its name.</p>
<p dir="auto">However, if you use a scripting plugin like PythonScript, you can make a script that <em>does</em> know the file’s name, and has access to a regex engine so that it can search for the file’s name in the active file (or in any other file, for that matter).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/84442</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/84442</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sun, 26 Feb 2023 17:13:33 GMT</pubDate></item></channel></rss>