Changed regular expression matching

Adjusted the regular expression matching, so that it supports other comments or annotations after the @accessibleForTesting annotation. Tests included.