Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #18872
| From | alex <1j9448a02@lnx159sneakemail.com.invalid> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: question about preg_replace |
| Date | 2022-02-23 20:10 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <sv60ra$bih$1@gioia.aioe.org> (permalink) |
| References | <sv5hv3$h8m$2@gioia.aioe.org> <sv5k3d$1ee0$1@gioia.aioe.org> <sv5kri$5og$1@gioia.aioe.org> <sv5l2a$k2d$3@dont-email.me> <sv5l5b$k2d$4@dont-email.me> |
Il 23/02/22 16:51, Lew Pitcher ha scritto:
> On Wed, 23 Feb 2022 15:49:31 +0000, Lew Pitcher wrote:
>
>> On Wed, 23 Feb 2022 16:45:53 +0100, alex wrote:
>>
>>> Il 23/02/22 16:33, Mateusz Viste ha scritto:
>>>> php -r "echo preg_replace('#^(.*)$#', 'start-\0-end', 'center')
>>>> .PHP_EOL;"
>>>>
>>>>
>>> Warning: preg_replace(): No ending delimiter '#' found in Command line
>>> code on line 1
>>
>> ~ $ php -r "echo preg_replace('#(^.*)#', 'start-\0-end', 'center') .
>> PHP_EOL;"
>> start-center-end
>
> Sorry, wrong example from my testing. How about...
>
> ~ $ php -r "echo preg_replace('#^(.*)#', 'start-\0-end', 'center') .
> PHP_EOL;"
> start-center-end
> ~ $
>
> It could be that we are running different versions of PHP.
thanks
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
question about preg_replace alex <1j9448a02@lnx159sneakemail.com.invalid> - 2022-02-23 15:56 +0100
Re: question about preg_replace Mateusz Viste <mateusz@xyz.invalid> - 2022-02-23 16:33 +0100
Re: question about preg_replace alex <1j9448a02@lnx159sneakemail.com.invalid> - 2022-02-23 16:45 +0100
Re: question about preg_replace Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2022-02-23 15:49 +0000
Re: question about preg_replace Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2022-02-23 15:51 +0000
Re: question about preg_replace alex <1j9448a02@lnx159sneakemail.com.invalid> - 2022-02-23 20:10 +0100
Re: question about preg_replace Mateusz Viste <mateusz@xyz.invalid> - 2022-02-23 18:06 +0100
Re: question about preg_replace alex <1j9448a02@lnx159sneakemail.com.invalid> - 2022-02-23 20:14 +0100
Re: question about preg_replace Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2022-02-23 15:45 +0000
Re: question about preg_replace alex <1j9448a02@lnx159sneakemail.com.invalid> - 2022-02-23 20:19 +0100
Re: question about preg_replace Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2022-02-23 21:02 +0000
csiph-web