Re: Catch line indetation
| From: | Curtis Maurand | Date: | Sun, 30 Oct 2016 11:18:20 +0000 |
| Subject: | Re: Catch line indetation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-325805@lists.php.net to get a copy of this message | ||
Well there is rtrim or trim which does both ends
On October 29, 2016 2:38:15 PM EDT, Narcis Garcia <informatica@actiu.net> wrote:
>Thanks Curtis, but I want to remove the opposite.
>
>
>El 29/10/16 a les 16:25, Curtis Maurand ha escrit:
>> Or use ltrim().
>>
>> $input = ltrim($input);
>>
>> Removes leading white space from a string.
>>
>> On October 29, 2016 10:02:56 AM EDT, Narcis Garcia
><informatica@actiu.net> wrote:
>>> Those two expressions are the only that work:
>>>
>>> preg_replace('/^(\s*)\S*/','${1}','
>>> <table>...</table>')
>>> preg_filter('/^(\s*)\S*/','${1}','
>>> <table>...</table>')
>>>
>>> Which one of those functions is the best to be used for this case?
>>>
>>>
>>> El 29/10/16 a les 07:52, richard gray ha escrit:
>>>> On 28/10/2016 14:15, Christoph M. Becker wrote:
>>>>>
>>>>> Shouldn't that be
>>>>>
>>>>> ^( *)[^ ]
>>>>>
>>>>> instead?
>>>>>
>>>> or maybe even ..?
>>>>
>>>> ^(\s*)
>>>>
>>>> Rich
>>>>
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.