jEdit Community - Resources for users of the jEdit Text Editor
Find Whole Word only?
Submitted by harmlesscat on Monday, 31 March, 2008 - 03:10
In the Find dialog, I'd like to be able to search for whole words only. E.g., I want to search for the word "cat" but not match occurrences of "catalyst". I cannot just put spaces before and after the word, because there are word delimiters other than a space, such as a comma, period, semi-colon, etc.

Some editors, UltraEdit I believe being one, has a "Find Whole Word Only" option in the search dialog, but jEdit does not. Does anyone know of an easy way to do this in jEdit, via a plugin or perhaps a regular expression? (If the latter, I'd prefer not to have to manually enter every possible punctuation mark every time I search this way.)
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
You can use the XSearch plugi
by Archimedes on Mon, 31/03/2008 - 10:50
You can use the XSearch plugin which gives you the three options
- whole word
- prefix
- postfix

or you can use a regular expression in standard jedit:
word\b

will find:
word

but not:
wording.

\b means word boundary
 
I didn't know about the \b ex
by harmlesscat on Mon, 31/03/2008 - 14:13
I didn't know about the \b expression. I believe that will meet my needs.

With XSearch, it appears to add some options but at the expense of others. In particular, I use the "Ignore Case" option on the normal Find dialog fairly often, and this is missing from the XSearch dialog.
 
XSearch has a button to Ignor
by Archimedes on Wed, 02/04/2008 - 07:31
XSearch has a button to Ignore the Case.
AFIR after the default install of XSearch not all options are shown.
I personally prefere to not use the tabbed layout
(Plugins->Plugin Options->Xsearch->Tabbed Layout)
and then i get one window with three buttons on the top right to turn on/off additional options.
The IgnoreCase Switch is in the "Settings" Icon
User login
Browse archives
« September 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   96034
Context Free Art (*.cfdg)   0.31   46061
BBEdit scheme   1.0   18600
JBuilder scheme   .001   18501
ColdFusion scheme   1.0   18030
R Edit Mode - extensive version   0.1   17480
Advanced HTML edit mode   1.0   16212
Matlab Edit Mode   1.0   16074
jEdit XP icons   1.0   15235
XP icons for jEdit   1.1   14299