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

Web and WebWorks Development

New Developer
Posts: 1
Registered: ‎09-21-2009
My Device: Not Specified

Regular expressions in Blackberry developer

New to developing web apps for Blackberry so please forgive if I ask the already known...   I've been trying for several weeks now to get an AJAX based app running on a Blackberry 9000... It works great on Iphone, Android G1, and mobile6.5 but not on Blackberry...  I get various modes of failure depending on whether I browse the site with the Visual Studio plugin simulator, an older software rev ( , or the latest...  Once I weeded through BOM headers being a source of some issue, I still get different levels of kaboom factor and the culprit seems to be related to Regular Expression Literals.   This peice of javascript does not seem to work any of them 



    var regex = /[/]([^-/]*)-([^/]*)/g;



I only know this as a regular expression literal so i'd love it if someone could tell me the correct name for this syntax. It is common all over the web and seems to occur in every jscript library I use.  



The following line does seem to work but of course, that means I have to edit my "off the shelf" libraries to make them compatible with the blackberry... Something i'm less than thrilled to have to do...


    var regex = new RegExp("[/]([^-/]*)-([^/]*)", "g");



I recon my biggest question is whether this is a known issue with the blackberry browser and whether it's likely to be fixed in the near future...