I
I
Igor2018-08-16 18:00:12
Regular Expressions
Igor, 2018-08-16 18:00:12

How to cut using regular expression: ./files?

Help please)
Need to cut

./files
<link rel="icon" href='./files/3102-e62.arb.png' type="image/png">

and replace it with your own value:
$str = '/folder/test';

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nick Sdk, 2018-08-16
@m0pfin

like this?
Or would you still like that option? )

$text = preg_replace('#\./files#is', '/folder/test', $text);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question