change regexp to avoid SOE on long words with underscores (PY-6604)

This commit is contained in:
Dmitry Jemerov
2012-08-23 12:55:11 +02:00
parent d2cb3f70ed
commit b51e02131c
@@ -31,7 +31,7 @@ public class TextSplitter extends BaseSplitter {
return INSTANCE;
}
private static final Pattern EXTENDED_WORD_AND_SPECIAL = Pattern.compile("([&#]|0x[0-9]*)?\\p{L}+'?\\p{L}(_*\\p{L})*");
private static final Pattern EXTENDED_WORD_AND_SPECIAL = Pattern.compile("([&#]|0x[0-9]*)?\\p{L}+'?\\p{L}[_\\p{L}]*");
@Override
public void split(@Nullable String text, @NotNull TextRange range, Consumer<TextRange> consumer) {