views:

446

answers:

2

Hello, Friend

I have a one textField in J2ME.

I want to search from a textfile using that textField Value then what will be the logic for that ?

Suppose if i enter abc in textField

then logic should return abc by comparing it from textfile field.

A: 

J2ME doesn't contain a standard regular expression API.

So, either write your own or use an existing library.

If you don't actually need special characters like wildcards, java.lang.String.indexOf(String) is your friend.

If your file is too big and you need to read it one buffer at a time, just be careful that the end of a buffer isn't the beginning of your search string. String.startsWith() will let you take care of that case.

QuickRecipesOnSymbianOS
A: 

Maybe you could use something like Jakarta Regex or other third parties?

altCognito