PHP library to manipulate text patterns with placeholders