Common path for regex matching