Hi!

Im getting this error : Warning: preg_replace(): No ending delimiter '.' found in C:\wamp\www\oa\include\config.inc.php on line 67. This is the line $file = preg_replace(".*/",'',$e_file);. tried to put . everywhere but its not so simple for me hahaha... Anny ideas?

Thank you!

Recommended Answers

All 2 Replies

Member Avatar for LastMitch

@dbalas

I'm getting this error : Warning: preg_replace(): No ending delimiter '.' found in C:\wamp\www\oa\include\config.inc.php on line 67.

You have to know how regex starts and ends this is done by delimiters.
Whatever your first character is, your last character has to be the same as the first character.

For example:

/:\dbalas(/
/:\regex\(/
/:dbalas:/
Member Avatar for LastMitch

@dbalas

everywhere but its not so simple for me hahaha... Anny ideas?

Try this:

<?php
$e_file = 'dbalas';
$file = preg_replace('".*/"', ' ', $e_file);
// This will be 'dbalas' now
echo $e_file;
?>

In the future post the whole code like the one above.

So it will easier to understand.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.