daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest Feb 12th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $string = 'Lorem ipsum dolor sit amet,[Hello world] consectetur adipiscing elit. Mauris ornare luctus diam sit amet mollis.';
  2. $newString = preg_replace('/[.+?]/', '', $string);
  3. echo $newString;
  4.    
  5. $input = "Lorem ipsum dolor sit amet,[Hello world] consectetur adipiscing elit. Mauris ornare luctus diam sit amet mollis.";
  6. $output = preg_replace('/[.+]/', '', $input);
  7. echo $output;
  8.    
  9. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris ornare luctus diam sit amet mollis.
  10.    
  11. $input = "Lorem ipsum dolor sit amet,[Hello world] consectetur [test] adipiscing elit. Mauris ornare luctus diam sit amet mollis.";
  12.    
  13. Lorem ipsum dolor sit amet, adipiscing elit. Mauris ornare luctus diam sit amet mollis.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top