mikeonbike wrote:Hi! Sublime won't find my regexp when i'm using \s and puts error. Is it bug or wrong regexp?
(\s.*)* is really nasty to evaluate. The error message basically says that the effort to evaluate it was too complicated. Think through what this is asking for: any combination of space characters followed by any combination of characters, repeated as many times as needed. So if the text being searched is a single space character, all is well. There's exactly one way to match it. If the text is two space characters, the match could be: \s matches both spaces, .* matches nothing, ()* matches exactly once; \s matches first space, .* matches second space, ()* matches exactly once; \s matches one space, .* matches nothing, ()* matches twice. So there are three possible matches. Now try three space characters and see how fast the number of possible matches blows up. My guess is that there are about 20 ways to match. And as you add more characters to the string to be matched, the number of possible matches becomes astronomical. Sublime gave up in despair.
What part of the text are you trying to pick out?