Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

is StringPattern documented anywhere?

I'm going ahead with a home-brew database for a location based app and I'm implementing

some look up features. It looks like some of the Arrays classes will let me make various indicies

but I wanted to add more general look up capabilities.

I'd like to have something like a regex facility so a user can grep

the location point-of-interest cache for particular patterns. It sounds like StringPattern may be

close to a regex but I can't tell and don't have any examples handy. Anyone have comments on this?






Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: is StringPattern documented anywhere?

$ grep -Ril StringPattern *

ok, I guess this helps but still not sure where to get more complete info- just the one example?


ApplicationDescriptor appDesc = new ApplicationDescriptor(ApplicationDescriptor.currentApplicationDescriptor(),"Active Text Fields",new String[]{"pattern-recognized"});

Posts: 17,003
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: is StringPattern documented anywhere?

marchywka are you answering posts in person or is it a script running grep? Smiley Wink
anyhow, good idea, doing it myself now Smiley Happy

net.rim.device.api.util.StringPattern is the class, but how to exactly use it, no clue, never tried.
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
BlackBerry Development Advisor
Posts: 15,759
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: is StringPattern documented anywhere?

You can find an example and documentation for it here:


How to - Leverage pattern matching in BlackBerry smartphone applications to provide an integrated user experience
Article Number: DB-00525


Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker