How to make negative lookahead work with end of line text

Posted by bryan-rasmussen on Stack Overflow See other posts from Stack Overflow or by bryan-rasmussen
Published on 2010-06-09T23:53:30Z Indexed on 2010/06/10 0:02 UTC
Read the original article Hit count: 340

Filed under:
|
|

Hi, I have a regex like the following:

.{0,1000}(?!(xa7|para(graf))$)

using Java. I was expecting that it would cause the following text to fail:

blaparagraf

because paragraf is found at the end

© Stack Overflow or respective owner

Related posts about java

Related posts about regex