This question got me thinking in a regex for matching javadoc comments that include some specified text.
For example, finding all javad
Try this one :
/\*\*([^\*]|\*(?!/))*?@deprecated.*?\*/
method2() does not have a javadoc comment and is therefor not deprecated (though the comment states it should be).
Also, if you want to extract information from the javadoc comments I’d recommend looking into the javadoc tool and writing a Doclet. You have easy access to all the information from the javadoc comment from there.