Re: help for not "Match all word only" in search feature



I recently wrote (with help from Jean-Noel) a pretty complete and
standalone implementation of search/replace in Anjuta CVS (ANJUTA_1_0_0
branch) (one source and one header file). It supports Perl regex search,
backreferences in replace, match whole word/word start/word end/complete
line, backward search, multi-file regex search/replace, specifying file
name patterns for match/ignore files and directories - the whole
shebang, and it has a cool libglade-base GUI. Feel free to use it in
whatever project you want. It is in src/search-replace.[ch]

If you want to have a feel for it, you can download a CVS tarball
(ANJUTA_1_0_0 branch) from anjuta.org/cvs. You'll need GNOME 1.x 
libraries to build it currently.

Hope this helps.

Rgds,
Biswa.


Hmmm; the implementation for this is not quite
the hard part (but still tough); the hard part is
brain-farting a standard that everyone will be comfortable with.

consider "attenti[ov][ne]" which by bash standards
will yield either "attention" or "attentive" (or of
course the bad matches attentioe and attentivn).

It's also harder to do this in a text file;
consider the string "*." and lets say that
your text file end in a "." (terminating a sentence);
your search risks returning the entire document as
a match.

(of course when parsing the unice `struct dirent'
you can rely on standard filelengths and the face
that filenames are matches; not the end of one filename
concatenated withe the beginning of the next).

Maybe strict single phrase only matching is your solution ?

in Microsoft word and many application of windows, there is "search"
feature which we could find some string in text.
how about the "wildcard".
Hmmm; lets hope we beat them to it ;-)


Good luck,
  -Tristan

xiening wrote:

dear sir/madam:
in Microsoft word and many application of windows, there is "search"
feature which we could find some string in text.
how about the "wildcard".
i want use
char * strstr(A_string, test_string)
    for "match all word only":
how about many wildcards just like following?
*       for any number of any char(s)
[a-h]   for any a to h char
\<      for first head
etc.
could you tell me the code that search a A_string by another string with
wildcard?
I find there is no this feature in abiword and gedit. through gnumoric
contains this feature. it is not for wild but for a complete word.
thank a lot for your attention
xn

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]