Hi,
I want to replace leading space with
same number of occurrences i.e.
Bit explanatory :
If one leading space exist in input then it should replace with one
If two leading spaces exist in input then it should replace with two
If n leading spaces are exist in input then it should replace with exact n number of times with
Ex.1:
My name is XYZ
output:
My name is XYZ
Ex.2 :
My name is XYZ
output:
My name is XYZ
I want to replace only leading spaces, using PHP regex.
Your suggestion are welcome.
Thanks