[Flashcoders] RegEx on a String (uppercase / lowercase)

2008-04-22 Thread Sidney de Koning
Hi List, I'm filtering my loaded XML with RegEx (regular expressions). The input i filter on is in a textfield. So I have a textfield on the stage and match that to the text in my XML. Right now i have a pattern the allows me to search only lowercase, but since all the names in my xml

Re: [Flashcoders] RegEx on a String (uppercase / lowercase)

2008-04-22 Thread Juan Pablo Califano
Hi, you can use the i flag in the second constructor parameter if you want a case insensitive regexp. Check the info about the constructor here for an explanation of that and other flags: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/RegExp.html#RegExp () Cheers Juan Pablo Califano

Re: [Flashcoders] RegEx on a String (uppercase / lowercase)

2008-04-22 Thread Sidney de Koning
Hi Wagner and Juan Pablo, Thanks for the response! I also tried this: var regObj:RegExp = new RegExp( ˆ + searchField_txt.text, i ); var filteredList:XMLList = landen.country. ( regObj.test( countryname.toLowerCase() ) ); And that worked aswell. However the sollution provided by both of you

Re: [Flashcoders] RegEx on a String (uppercase / lowercase)

2008-04-22 Thread Wagner Amaral
If you pass a second parameter of i to the RegExp constructor, it will match insensitively: var regObj:RegExp = new RegExp( ˆ + searchField_txt.text, i ); Look here for the description of all the flags a RegExp can take in AS3:

Re: [Flashcoders] RegEx on a String (uppercase / lowercase)

2008-04-22 Thread Glen Pike
Check out Grant Skinner's RegExr application - it's perfect for testing out RegExp's and has helpful hints on different Regex params, etc. You can use it online here there is a download link on the page too... http://gskinner.com/RegExr/ Glen Sidney de Koning wrote: Hi Wagner and Juan

Re: [Flashcoders] RegEx on a String (uppercase / lowercase)

2008-04-22 Thread Juan Pablo Califano
Great link, thanks! 2008/4/22, Glen Pike [EMAIL PROTECTED]: Check out Grant Skinner's RegExr application - it's perfect for testing out RegExp's and has helpful hints on different Regex params, etc. You can use it online here there is a download link on the page too...