Sublime Forum

File_regex breaks sublime-build

#1

I have specified the following build system for sublime.

When I comment out my file_regex line, it works fine. When I comment it back it, my build system is no longer recognized.

The regex I have provided works perfectly fine when using it in the “find” box in sublime text. Why is is breaking the sublime-build file?

{
“cmd”: [“gradle” , “build”],
“working_dir”: “${project_path}”,
“file_regex”: “([^/]+.java)”
}

0 Likes

#2

because \/ is not a valid JSON string escape, you need to use \\/ to get a literal backslash and a literal forward slash
I highly recommend installing https://packagecontrol.io/packages/PackageDev to get proper syntax highlighting

2 Likes