I'm trying to match the beginning of a file in a VSCode regex search to find and remove the following pattern:
//
Anything else to leave in place
etc.
I'd like to remove the first line in all files that contain //\n
as the first characters. However when I perform a regex search for //\n
it matches all occurences in all files obviously, regardless of their position in the file.
The regex language mentions the existence of \A
to match the beginning of a line, or file in some editors, but VSCode rejects this regex as invalid: \A//\n
.
So my question is, how can I match the beginning of a file in VSCode to achieve what I need?