preg_replace javascript
var text = 'test test test test',
fixed;
fixed = text.replace(/s+/g, '-');
preg_replace javascript
var text = 'test test test test',
fixed;
fixed = text.replace(/s+/g, '-');
php preg replace
preg_replace($pattern, $replacement, $subject [, $limit [, &$count]]);
// Returns an array if the subject parameter is an array,
// or a string otherwise.
// If matches are found, the new subject will be returned, otherwise
// subject will be returned unchanged or NULL if an error occurred.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us