Quick actions

cmd+k|ctrl+k

Navigation

Languages

regex multi space replace

Snippet info

Language

Php

Visibility

public

Author

muhammad.arif2405

Created

2019-11-18T10:44:22Z

Updated

2019-11-18T10:55:29Z

<?php
$pattern = '/([\s]+)/';
$teks = "saya ingin  makan   sate";
$output = preg_replace($pattern,' ',$teks);

echo $teks."\n";
echo $output;
?>
INFO