Does anyone know of a Java dependency or suite of regular expressions that can check a string for instances of code? Preferably one that can check for instances of code based off paramter such a programming language or language type? I would also consider using regular expressions if a comprehensive suite of them existed. My searches are coming up empty although the search terms I'm using aren't very descriptive (don't know exactly how to phrase it).
I can think of some libraries that may work in a way that they werent intended for. However I would assume an entire library would provide a bit more robustness and completeness