On Sat, 2012-02-11 at 11:28 +0000, Simon Osborne wrote: > Only > several searches were needed when using a rough regular expression such as: > > <!--ERRTAG-[A-Z]+-[0-9]+--> > <!--/ERRTAG-[A-Z]+-[0-9]+--> > <!--ERRTAG-[A-Z]+-[0-9]+-[A-Z]+--> > <!--/ERRTAG-[A-Z]+-[0-9]+-[A-Z]+--> > > I'm sure that can be reduced down to just one expression, but I'm just > dabbling to make life simpler for myself. ;-) yeah you can use ? to mean "may or may not be present" ... so (assuming all your escaping is correct) you could use: <!--/?ERRTAG-[A-Z]+-[0-9]+(-[A-Z]+)?--> ~~~~~~ Manage your subscription at //www.freelists.org/list/projectaon