Regular Expression relace Myname _Mysurname with "" in PHP
- by streetparade
I need a regular expression which replaces a string like this
"Myname _MySurename" with "Myname"
that means i just need Myname, so _MySurename should be cut.
i tryed something like "/_*/" but that replaces just the _ (underscore)
how can i do that in PHP ?