What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-02-01 21:02:06
replace many chracters js
// You can use regex to do it in only one replace // Using the or: | var str = '#this #is__ __#a test###__'; str.replace(/#|_/g,''); // result: "this is a test" // Or using the character class str.replace(/[#_]/g,''); // result: "this is a... Add solution -
PHP 2022-02-01 07:30:31
php recursive zip with less memory
$source = <absolute pathname to directory/file to be zipped> . DIRECTORY_SEPARATOR; $fileName = "myfiles.zip"; $destination = <absolute pathname to destination directory> . DIRECTORY_SEPARATOR . $fileName; function zip_files( $sourc... Add solution -
Javascript 2022-01-31 03:32:26
javascript replace newline
function nl2br(str){ return str.replace(/(?:\r\n|\r|\n)/g, '<br>'); } var stringWithNewLines= `Well this is a a very broken sentance`; var stringWithBrs=nl2br(stringWithNewLines); // stringWithBrs= "Well this is a<br>a very <br... Add solution -
Best helpers
Ranking is empty