I have a list of 200,000 words in a text file and am looking for a program to run through and delete the words that are longer than 11 letters. It's pretty simple but is there one out there?
$file = fopen('textfile','r'); while($tot = fread($file,125647)){$content .= $tot;} fclose($file); $lines = explode($content,"\n"); $new_file = fopen('newtextfile','w'); foreach($lines as $line){ if(strlen($line) <= 11){ fwrite($new_file,$line."\n");} } fclose($new_file); PHP: Peace,
Use a regular expression find/replace on dreamweaver, textpad or other programs supporting regular expressions find: "^.{12,}$" change all occurences to : "" or "whatever you want" dont type the quotes