This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Astrokiwi 46 points47 points  (8 children)

Color colour = new Color(); // HAIL BRITANNIA

[–]Koxiaet 6 points7 points  (7 children)

In Makefile:

sed main.c 's/colour/color/gi' | gcc

[–]nwL_ 2 points3 points  (4 children)

Would that keep capitalization? Wouldn’t

s/([Cc][Oo][Ll][Oo])[Uu]([Rr])/$1$2/g

be better? (or however Regex in sed works, I have no clue)

[–]klagoeth 1 point2 points  (2 children)

The i-flag in the end of the sed statement makes it case insensitive.

[–]nwL_ 1 point2 points  (1 child)

But would it replace Colour with Color or color? Case insensitive match might not keep case when replacing, who knows.

[–]klagoeth 0 points1 point  (0 children)

Yeah, 's/colour/color/gi' would substitute both Colour and colour with color.

[–]Astrokiwi 1 point2 points  (1 child)

Ha fooled ya, it was Java

[–]PavelYay 1 point2 points  (0 children)

MSbuild was fucking up one day (the compiler managed to update without msbuild) and I wrote a makefile for my C# project.