1 2 Previous Next 19 Replies Latest reply: Aug 12, 2010 2:59 AM by 843790 Go to original post RSS
      • 15. Re: java.lang.StackOverflowError reading to a variable
        843790
        Can you use the expression
        "(?:/\\*(?:[^*]|(?:\\*+[^*/]))*\\*+/)|(?://.*)"
        in the pattern?

        Because this worked for me, if the input js file is having the below content
        */**  sample.js
        *
        *
        */
        
        init() {
        }
        Edited by: malli2010 on Aug 11, 2010 5:34 AM
        • 16. Re: java.lang.StackOverflowError reading to a variable
          843790
          malli2010 wrote:
          Can you use the expression
          "(?:/\\*(?:[^*]|(?:\\*+[^*/]))*\\*+/)|(?://.*)"
          in the pattern?

          Because this worked for me, if the input js file is having the below content
          */**  sample.js
          *
          *
          */
          
          init() {
          }
          And your point is?
          • 17. Re: java.lang.StackOverflowError reading to a variable
            843790
            Hi,

            I would like to get the solution instead of dragging this conversation to indefinite. My problem is, when I used the above given SSCCE java code (which contains the regular expression) to work on the below js file (which I already posted in the forum), I am getting stack overflow error though the file is a valid file.

            All I need to get is, the uncommented portion of javascript file as output (i.e)
            var so = abc.device.load("contacts");
            var so = abc.device.load("contacts");{code}
            The actual java script file's contents on which I am testing, is given below  :
            {code:java}
            /**
            * Loads an instance of a device service interface. This is a synchronous
            * function.
            *
            * @alias nokia.device.load
            *
            * @param {string} interfaceName A fully qualified name of the interface name.
            *                      E.g. A fully qualified name: nokia.device.contact
            *
            * @param {string} [version] A string representing the interface version number.
            *                Matches if the supported version is equal to or larger than
            *                the supplied version.e.g. 1.0
            *                If not specified the framework will load the default version
            * @example
            * // Loading the service defined by the Contact API:
            * try {
            *   var so = nokia.device.load("contacts");
            *   // use Contact API functions: so.addContact(), or so.getContact(), etc.
            * } catch (e) {
            *   // An error occurred. If e.name is "DeviceException", then the error orginates
            *   // in load(), the properties e.message and e.code contain more information.
            * }
            * @throws {DeviceException} May throw non-recoverable errors with error codes 1 through 3.
            * @return {ServiceInterface} An object that implements ServiceInterface and in addition contains the
            *                               functions defined in the API identified by +interfaceName+.
            */
            var so = abc.device.load("contacts");
            var so = abc.device.load("contacts");{code}
            
            Please see to it and help me to solve the problem as soon as possible. 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
            • 18. Re: java.lang.StackOverflowError reading to a variable
              EJP
              You don't appear to understand that these forums are manned by volunteers, not by paid employees. Please mind your manners & adjust your expectations.

              This is not even a Java programming question, strictly speaking, but a Regular Expressions question.
              • 19. Re: java.lang.StackOverflowError reading to a variable
                843790
                malli2010 wrote:

                and help me...
                Help yourself with this [http://jakarta.apache.org/oro/demo.html|http://jakarta.apache.org/oro/demo.html].
                1 2 Previous Next