anyone can help to convert this
I am trying
however it does not work in the same way
no it works I was wrong , however anyone can tell me difference between
which seem to work in the same way ?
Yup, those do the same thing.
You can choose any character you like for the start and end of the expression, as long you use the same character for both.
The thing is that the character you choose has to be escaped if you use it in the expression itself, which is why some characters are a poor choice (like / which I find needs to matched quite a lot).
My personal preference goes to ~ because that almost never occurs in an expression. Of course that is personal, other people might prefer other characters.
I didn't know it , very useful thank you
The difference is only in the delimiters, for how they should/can be used see http://php.net/regexp.reference.delimiters