joshtynjala commented on issue #1102:
URL: https://github.com/apache/royale-asjs/issues/1102#issuecomment-819633928


   > I do it through the constructor, passing it the pattern as a text string, 
the result is different.
   > var miexc3:RegExp=new RegExp("^(\ *)([+\-]?)(\ *)(\d+)(\:|\.|\ 
)([0-5]{1})([0-9]{1})(\ *)$","gi");
   
   The \ character in a string escapes the next character (for instance \n is 
new line and \t is tab). To include a backslash in a string that will actually 
be a backslash, you need to escape it with an extra backslash, like this: \\
   
   With that in mind, I think that this is actually what you want when using 
the constructor:
   
   ```as3
   var miexc3:RegExp=new RegExp("^(\\ *)([+\\-]?)(\\ *)(\\d+)(\\:|\\.|\\ 
)([0-5]{1})([0-9]{1})(\\ *)$","gi");
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to