in reply to Makeing rules in Regex for string content and size

Could you show us what you tried, and why that won't work?
I think pointing you to perlman:perlre is good enough for a start, else you won't learn too much :-)
-- bash$ :(){ :|:&};: