That is not a trivial operation, as the code has to be parsed.
As it happens, I have a tool to do read source code strip of the comments, write it back to the database, and then bulid a full-text index on the comment-less code. But the tool is part of a larger toolset, so you may find it hard to get started.
The toolset is AbaPerls, which you find here: https://www.sommarskog.se/AbaPerls/index.html. The specific tool I described above is VCDBLOAD, which you can use without understanding the rest of the toolset. But it may still take some time to get started.