The same issue applies to String.search(), although it might make sense to 
replace String.search() with String.indexOf() if the parameter is a string.

> On Jul 18, 2017, at 12:36 PM, yishayw <yishayj...@hotmail.com> wrote:
> 
> In flash String.match() can take either a string or a regex. In JS it's
> always considered to be a regex. So str.match("?") is valid in flash but
> will fail in JS. We ran into that porting our app which includes some code
> to test for url params. 
> 
> So maybe the compiler should identify that the input is a string and replace
> all special chars as suggested here [1]?
> 
> [1]
> https://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
> 
> 
> 
> 
> --
> View this message in context: 
> http://apache-flex-development.2333347.n4.nabble.com/FlexJS-String-match-tp63392.html
> Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to