RegEx: look-behind-Assertions are buggy
Submitted by Tuesday, 7 September, 2004 - 00:49
on
When i search the word "foobar" for
foo(?=bar)
jEdit delivers "foo" as a result, which is right.
However, when I search for (?<=foo)bar, i get the following error Message, although i'm pretty sure my RegEx is OK so far.
foo(?=bar)
jEdit delivers "foo" as a result, which is right.
However, when I search for (?<=foo)bar, i get the following error Message, although i'm pretty sure my RegEx is OK so far.
gnu.regexp.REException: At position 1 in regular expression pattern: quantifier (?*+{}) without preceding token at gnu.regexp.RE.initialize(RE.java:509) at gnu.regexp.RE.(RE.java:269) at gnu.regexp.RE. (RE.java:254) at org.gjt.sp.jedit.search.RESearchMatcher. (RESearchMatcher.java:57) at org.gjt.sp.jedit.search.SearchAndReplace.getSearchMatcher(SearchAndReplace.java:293) at org.gjt.sp.jedit.search.SearchAndReplace.find(SearchAndReplace.java:446) at org.gjt.sp.jedit.search.SearchDialog.ok(SearchDialog.java:199) at org.gjt.sp.jedit.search.SearchDialog$ButtonActionHandler.actionPerformed(SearchDialog.java:936) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)