i have the following code:
/**
* @generated
*/
public class foo ...
/**
* @generated
*/
public class bar...
public class interesting
I am interested in those signatures, which haven’t the @generated tag. Therefore I was trying to write a regular expression. But I can’t get it working… Can you please help me ?
([\^*][/]\r\n)p
matches all elements with the @generated tag, but how can I get those withouth the @generated tag ?!
Thanks a lot
You should start with regex
(?<!@generated\n\*\/\n)(public class .*)and if needed to add some\sto negative lookbehind(?<! ... ). Lookbehind has to be fix pattern, so you need to adjust it exactly without\s*or some other variable length pattern.