Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(?<![\w`])@(\.?[^\s`,.]*(?:\.[^\s`,.]+)*)
/
g
Input 1
This is a @valid/path/to/a/file and it should also match at the beginning of a line: @another-valid/path/to/a/file but this is not: - Adds a "Co-authored-by:" footer which clarifies which AI agent helped create this commit, using an appropriate `noreply@...` or `noreply@anthropic.com` email address. We also need to deal with files followed by @commas, ones with @file-extensions.md, even @multiple.extensions.bak, hidden directorys like @.config/ or files like @.bashrc and ones at the end of a sentence like @foo.md. Also shouldn't forget @/absolute/paths.txt with and @/without/extensions, as well as @~/home-files and @~/paths/under/home.txt. If the reference is `@quoted/in/backticks` then it shouldn't match at all.