Use Regular Expressions to generate text string in PHP.