Skip to content

Instantly share code, notes, and snippets.

@mircobabini
Created April 24, 2013 08:57
Show Gist options
  • Save mircobabini/5450744 to your computer and use it in GitHub Desktop.
Save mircobabini/5450744 to your computer and use it in GitHub Desktop.
Dedicato a chi non mette lo spazio prima delle parentesi. Con immenso odio, M.
<?
$input = "input.java";
$c = file_get_contents ($input); // get the mess
$c = str_replace ('(', " (", $c); // fill the space
$c = preg_replace ('#\s\s+\(#', " (", $c); // remove multiple spaces
file_put_contents ("output.java", $c); // spread the world
// one day you will regret it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment