RegEx for Swift color coding

Category : Uncategorized

RegEx for Swift color coding

Commands (search by word)

class ,8
func ,8
public ,8
var ,8
let ,8
true ,8
false ,8
override ,8
self,8
super,8
if ,8
else ,8
for ,8
nil ,8
in ,8

CGFloat ,1
Bool ,1
String ,1
Int ,1

Options (regex,coloring length, color code

print\(([^)]+)\),5,1
UIView\(([^)]+)\),6,1
UILabel\(([^)]+)\),7,1
UIImageView\(([^)]+)\),11,1
UITextView\(([^)]+)\),10,1
UITableView\(([^)]+)\),11,1
#selector\(([^)]+)\),9,1
\d{2}[a-zA-Z]{3}\d{4},9,1

Color codes

1 => Blue
2 => Red
3 => Purple
4 => Green
5 => Gray
6 => Cyan
7 => Brown
8 => Magenta
9 => Orange
10 => Yellow
11 => White
12 => Black