jEdit Community - Resources for users of the jEdit Text Editor
swap to java.util.regex?
Submitted by farmerBri on Tuesday, 27 June, 2006 - 06:27
First off - long time user, first time poster - I love jEdit, have converted most of my co-developers to jEdit devotees in the last couple of years (it's suprisingly easy to push jEdit considering how close text-editor choice is to religion amongst developers)

So, yeah - jEdit uses gnu.regexp rather than the java default java.util.regex for reasons I don't yet understand... I'm hoping some kind soul will enlighten me.
I'm particularly missing lookbehinds, both negative and positive, but after a quick comparison of the gnu.regexp documentation with java.util.regex there is also lots of other useful things:
  • \p{Punct} -- Punctuation: One of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
  • \P{InGreek} -- Any character except one in the Greek block (negation)
  • [a-z&&[^bc]] -- a through z, except for b and c: [ad-z] (subtraction)
  • X?+ -- X, once or not at all (Possessive quantifiers)
  • (?idmsux-idmsux:X) -- X, as a non-capturing group with the given flags on - off
I can't see anything in gnu.regexp that is not available in java.util.regex. So java.util.regex is more powerful (in terms of options) and I also often use the search in jEdit for conveniently testing my regexes before using in a java app, so it would be beneficial to say the least if they both spoke the same syntax Sticking out tongue

In summary - is it possible / feasible for me to swap the default regexp implementation to java.util.regex? I'm willing to get my hands dirty, but some pointers would be greatly appreciated.

cheers all.
hail jEdit.
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
there's hope for You without work
by Robert Schwenn on Tue, 27/06/2006 - 20:55
Seems that You only have to wait a bit. Look here

Robert

 
'tis the season...
by farmerBri on Tue, 27/06/2006 - 23:43
Thanks Robert, that is indeed good news. Smiling
User login
Browse archives
« April 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   82348
Context Free Art (*.cfdg)   0.31   46055
JBuilder scheme   .001   18495
BBEdit scheme   1.0   18116
ColdFusion scheme   1.0   18024
R Edit Mode - extensive version   0.1   17473
Advanced HTML edit mode   1.0   16206
Matlab Edit Mode   1.0   16068
jEdit XP icons   1.0   15229
XP icons for jEdit   1.1   14293