in reply to regex format issue

Please see How do I post a question effectively? - you haven't shown which error message you're getting, and please use <code> tags to format your code, sample input, and expected output. Also, when asking questions about regexes, please provide as much sample input (both what should match and what shouldn't) as you can - see Re: How to ask better questions using Test::More and sample data.