jEdit Community - Resources for users of the jEdit Text Editor
RegEx: look-behind-Assertions are buggy
Submitted by Anonymous on Tuesday, 7 September, 2004 - 00:49
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.

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)
User login
Browse archives
« November 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   101634
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17481
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300