I’m attempting to write a custom RegExpValidator in AS3 (similar to this). I’m wondering (and I’ve checked livedocs…), what is the ‘flags’ property on a RegExpValidator used for?
All of the examples I find set it to “g”, what is that all about? The livedocs as well as some StackOverflow questions have the same use flags = "g".
What other values are allowed? What is the value-add of this property?
It means match globally. This is consistent with most regular expression engines. Otherwise it will only match the first case, so if your regex is to replace the word ‘one’ with ‘two’ without ‘g’, it only does the first match.