Re: Catch line indetation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux