Prototype with regex matching