11 fix php script to add regex logic and unicode output