<?php $file = 'blah etc user delboy1978uk insecure-password 123456 etc etc'; $regex = '#\nuser\s\w+\sinsecure-password\s.+\n#'; preg_match($regex, $file, $matches); $file = str_replace($matches[0], "\n", $file); echo $file;
You have javascript disabled. You will not be able to edit any code.