add regex and swap example