[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[OT] searching for a regular expression to match strings



Hi,

anyone knows about a (high-performance) regular expression to match
java-like Strings?
(e.g. "Hi, World \n this is a \"-quoted string.\n")

I have tested 

((\\.)|[^"\\])*

which basically does what I want (although capturing too much escape
sequences). 

The problem is: I've tried jakarta's regexp and java's implementation
and both run into Stack Overflows for input strings with more than 500
characters. That is definitely not acceptable as a hard limit for
tokenizing source code.

Any suggestions?

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]