jEdit Community - Resources for users of the jEdit Text Editor
Problem finding what I want :)
Submitted by Ziabuch on Thursday, 23 September, 2010 - 15:07
Hello Smiling

I would like to search for the following expression in the text file:

$123 1

Of course the command for this is SearchAndReplace.setSearchString("$123 1");

And it works.

The problem is - that the "123" part of this string is random. So what I really need to find is the first "$", ignore the next 3 digits, find 1 space and finally find "1".

How to create a search command to ignore that "123", or "243" or whatever it may be?

For example if I want to list the file 123AA.txt, I simply put the command "dir ???AA.txt". Is that possible when using BeanShell?

Thanks for advice Smiling
Z.
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Regular Expressions
by Robert Schwenn on Thu, 23/09/2010 - 19:05
It's possible with "Regular Expressions" ( http://www.jedit.org/users-guide/regexps.html ).

You'd have to set:
SearchAndReplace.setRegexp(true);
SearchAndReplace.setSearchString("\$[0-9][0-9][0-9] 1");

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   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