jEdit Community - Resources for users of the jEdit Text Editor
"Search" help
Submitted by ELockhart on Friday, 7 July, 2006 - 12:42
I am relatively new to jEdit and using the "Search" feature. I have reviewed the jEdit Help under Regular Expressions but I am having trouble trying to construct a search that would find the word or string 'Folder' at the beginning of a line and also contain the string 'UT120AP' within the line, disregarding all other text contained within the line.

Can some please help? Also, is there documentation of sample regular expressions I might learn from?

Thanks in advanced,
Eric
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Solution and recommendation
by vlashua on Sat, 08/07/2006 - 15:08
^Folder[^\n]*?UT120AP

^ (Only look at beginning of line)
Folder (literal)
[ (begin group of possible character(s) in this position)
^ (negate this group of characters--anything but these characters)
\n (new line code -- don't want to catch a new line before "UT...")
] (end the group)
* (expect "0 or more" characters like the one to the left)
? (limit the search to the first occurance of whatever follows)
UT120AP (literal)

Recommendation
The key thing about Regexs is that "there is always a simpler way". You need to spend an hour "getting" the jEdit help page category by category and, one at a time, trying the options out on a file in jEdit. How do you get to Carnegie Hall ... practice, practice, practice.

Google//: Regular Expressions Examples
http://www.regular-expressions.info/examples.html

============
vlashua@computer.net
"Search" help
by Axel on Fri, 07/07/2006 - 19:55
Hello Eric,

the REtest-plugin:

http://plugins.jedit.org/plugins/?RETest

and its associated help file could be interesting for you.

Regards,

Axel
The search string is: "^Folde
by Robert Schwenn on Fri, 07/07/2006 - 19:41
The search string is: "^Folder.*UT120AP".
Try this Tutorial

Robert
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   82349
Context Free Art (*.cfdg)   0.31   46055
BBEdit scheme   1.0   18595
JBuilder scheme   .001   18495
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