This isn't really a regex problem though. The regex probably did exactly what the dev intended, it's just that the dev failed to take into account that <author> could also be a 0 length string.
The same logic bug would have occured with a parser.
The same logic bug would have occured with a parser.