Skip to main content
added 4 characters in body
Source Link
Riley
  • 11.7k
  • 2
  • 23
  • 53

sedGNU sed 81 74 73 Bytes

Includes +1 for -r

s/\b./\u&/g :;s/.(And?|A[st]?|The|By|But|[FN]or|In|O[fnr]|To|Up) /\L&/;t 

The first line capitalizes the first letter of every word. The second switches all of the required words back to lowercase.

Try it Online!

sed 81 74 73 Bytes

Includes +1 for -r

s/\b./\u&/g :;s/.(And?|A[st]?|The|By|But|[FN]or|In|O[fnr]|To|Up) /\L&/;t 

The first line capitalizes the first letter of every word. The second switches all of the required words back to lowercase.

Try it Online!

GNU sed 81 74 73 Bytes

Includes +1 for -r

s/\b./\u&/g :;s/.(And?|A[st]?|The|By|But|[FN]or|In|O[fnr]|To|Up) /\L&/;t 

The first line capitalizes the first letter of every word. The second switches all of the required words back to lowercase.

Try it Online!

deleted 12 characters in body
Source Link
Riley
  • 11.7k
  • 2
  • 23
  • 53

sed 81 74 7473 Bytes

Includes +1 for -r

s/\b./\u&/g :;s/.(A(ndAnd?|s|t)|A[st]?|The|B(y|ut)|[FN]or|In|O[fnr]|To|Up|The|By|But|[FN]or|In|O[fnr]|To|Up) /\L&/;t 

The first line capitalizes the first letter of every word. The second switches all of the required words back to lowercase.

Try it Online!Try it Online!

sed 81 74 Bytes

Includes +1 for -r

s/\b./\u&/g :;s/.(A(nd?|s|t)?|The|B(y|ut)|[FN]or|In|O[fnr]|To|Up) /\L&/;t 

The first line capitalizes the first letter of every word. The second switches all of the required words back to lowercase.

Try it Online!

sed 81 74 73 Bytes

Includes +1 for -r

s/\b./\u&/g :;s/.(And?|A[st]?|The|By|But|[FN]or|In|O[fnr]|To|Up) /\L&/;t 

The first line capitalizes the first letter of every word. The second switches all of the required words back to lowercase.

Try it Online!

deleted 7 characters in body
Source Link
Riley
  • 11.7k
  • 2
  • 23
  • 53

sed 8181 74 Bytes

Includes +1 for -r

s/\b./\u&/g :;s/.(A(nd?|s|t)? |The |B|The|B(y|ut) |[FN]or |In |O[fnr] |To |Up |[FN]or|In|O[fnr]|To|Up) /\L&/;t 

The first line capitalizes the first letter of every word. The second switches all of the required words back to lowercase.

Try it Online!

sed 81 Bytes

Includes +1 for -r

s/\b./\u&/g :;s/.(A(nd?|s|t)? |The |B(y|ut) |[FN]or |In |O[fnr] |To |Up )/\L&/;t 

The first line capitalizes the first letter of every word. The second switches all of the required words back to lowercase.

Try it Online!

sed 81 74 Bytes

Includes +1 for -r

s/\b./\u&/g :;s/.(A(nd?|s|t)?|The|B(y|ut)|[FN]or|In|O[fnr]|To|Up) /\L&/;t 

The first line capitalizes the first letter of every word. The second switches all of the required words back to lowercase.

Try it Online!

added 10 characters in body
Source Link
Riley
  • 11.7k
  • 2
  • 23
  • 53
Loading
Source Link
Riley
  • 11.7k
  • 2
  • 23
  • 53
Loading