Wednesday, July 08, 2009

wild card search in eclipse

While eclipse's simple search is good enough for most purpose; You can make use of wild cards to enhance your search results. For example adding dots in your search text will ignore that many characters and match rest of the string.


Example:
text: The quick brown FOX jumps over the lazy DOG
search for: f.x
will match: FOX

text: The quick brown FOX jumps over the lazy DOG
search for: b..wn
will match: brown


text: The quick brown FOX jumps over the lazy DOG
search for: q...k
will match: quick


Now say you dont know the number of characters either. In this case you can make use of start to match any number of characters.

Example:

text: The quick brown FOX jumps over the lazy DOG
search for: the.*fox
will match: The quick brown FOX


text: The quick brown FOX jumps over the lazy DOG
search for: the.*brown.*over
will match: The quick brown FOX jumps over

Labels:

0 Comments:

Post a Comment

<< Home