Add regex to match method declaration.