Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main( string[] args )
- {
- string[] lines = File.ReadAllLines( "BD05_CreaTablasTarea.sql" );
- StringBuilder sb = new StringBuilder();
- foreach ( string line in lines )
- {
- sb.AppendLine( TransformDate( line ) );
- }
- File.WriteAllText( "BD05_CreaTablasTareaFixed.sql", sb.ToString( ) );
- }
- private static string TransformDate( string line )
- {
- return Regex.Replace( line, "([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})", TransformMatch );
- }
- private static string TransformMatch( Match match )
- {
- return match.Result( "$2/$1/$3" );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement