I'm building a snippet to help me write java classes and I'm trying to construct a regex to convert $TM_FILEPATH into a package statement (if you know of such a regex please let me know). When I use the following line in my snippet and invoke the snippet in a file sublime instantly crashes.
Where "ade" is the project's src directory. The error message it throws is:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl >'
what(): The complexity of matching the regular expression exceeded predefined bounds. Try refactoring the regular expression to make each choice made by the state machine unambiguous. This exception is thrown to prevent "eternal" matches that take an indefinite period time to locate.
I totally agree that my regex is to blame, but I feel like there's a better way to handle it than instant crash.