[Flashcoders] RegEx

2010-08-30 Thread Karl DeSaulniers
Hello, Thought this might be of interest to anyone needing RegEx for almost anything. http://www.owasp.org/index.php/OWASP_Validation_Regex_Repository Looks like a good resource for code ideas. Karl DeSaulniers Design Drumm http://designdrumm.com

Re: [Flashcoders] regex issue when validating unicode range

2009-10-20 Thread Matt Muller
thanks for the insight there Juan :) Chat Skype: mattmuller MSN: matt_b_mul...@hotmail.com Contact Me [image: Linkedin] http://www.linkedin.com/in/mattmuller[image: Facebook] http://www.facebook.com/matthewmuller[image: Twitter]http://twitter.com/mattmuller On Tue, Oct 20, 2009 at 3:57 AM, Juan

[Flashcoders] regex issue when validating unicode range

2009-10-19 Thread Matt Muller
Hi there, issue with regex when trying to test if a char is within a unicode range var testIsArabic:Boolean = /\u0627/.test(str.charAt(0)); // this works testing for arabic chars of unicode 0627 var testIsArabic:Boolean = /[\u0627-\u]/.test(str.charAt(0)); this range does not work,

Re: [Flashcoders] regex issue when validating unicode range

2009-10-19 Thread Ktu
Have you tried looking at Grant Skinner's RegExp App? It might help http://gskinner.com/RegExr/ Ktu On Mon, Oct 19, 2009 at 1:24 PM, Matt Muller matthewmul...@gmail.comwrote: Hi there, issue with regex when trying to test if a char is within a unicode range var testIsArabic:Boolean =

Re: [Flashcoders] regex issue when validating unicode range

2009-10-19 Thread Juan Pablo Califano
Hi I don't think the regex is wrong. In fact, if you change u for a smaller number, it works fine. I have not tested each code point, mind you, but with a few tries, the highest max range that works that I could find is 0xFEFF. The range 0xFF00 - 0x apparently is reserved for control

Re: [Flashcoders] regex in switch statement

2009-05-15 Thread Sidney de Koning
Hi MM, I think its better practice to define that regex in a variable and switch on that variable. HTH, Sidney de Koning On May 15, 2009, at 2:12 PM, Mendelsohn, Michael wrote: Hi list... Is it possible to use a regular expression as a case in a switch statement? I've been searching

RE: [Flashcoders] regex in switch statement

2009-05-15 Thread Mendelsohn, Michael
Thanks for responding Sidney. I think if I set a var prior to the switch, it might not work because there are so many strings going into the switch. I'm trying to optimize this that would apply to only some of all the cases: switch(str){ case (W1) : case (W2) : case

RE: [Flashcoders] regex in switch statement

2009-05-15 Thread Mendelsohn, Michael
That didn't work for me. :-/ - MM Oke, i think you can, since it matches the input given with the case. i didnt test it. But cant you store the regex in a var and put that in the case? like so: var myRegEx:RegExp = /(W|M|K)\d/i; var stringToMatch = ; switch(stringToMatch) {

Re: [Flashcoders] regex in switch statement

2009-05-15 Thread John Giotta
This is very odd request. With switch... case, its only useful if you have the same condition expression. Your regex example is a similar expression, but no where the same. No I think you better off with if...else in this matter. ___ Flashcoders mailing

Re: [Flashcoders] RegEx

2009-05-11 Thread Anthony Pace
/String.html#match() - Original Message - From: Anthony Pace anthony.p...@utoronto.ca To: Flash Coders List flashcoders@chattyfig.figleaf.com Sent: Sunday, May 10, 2009 12:54 AM Subject: [Flashcoders] RegEx I am reading the documentation, and it says that match and replace are only for air 1.0

Re: [Flashcoders] RegEx

2009-05-10 Thread Ian Thomas
Match and replace work fine for me outside of AIR. Ian On Sat, May 9, 2009 at 11:54 PM, Anthony Pace anthony.p...@utoronto.ca wrote: I am reading the documentation, and it says that match and replace are only for air 1.0 and they have that nasty trilobal air logo. What the heck  If that

Re: [Flashcoders] RegEx

2009-05-09 Thread Anthony Pace
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/String.html#match() Anthony Pace wrote: I am reading the documentation, and it says that match and replace are only for air 1.0 and they have that nasty trilobal air logo. What the heck If that is the case then why are they running in the

[Flashcoders] RegEx

2009-05-09 Thread Anthony Pace
I am reading the documentation, and it says that match and replace are only for air 1.0 and they have that nasty trilobal air logo. What the heck If that is the case then why are they running in the flash player? ___ Flashcoders mailing list

Re: [Flashcoders] RegEx

2009-05-09 Thread Muzak
: [Flashcoders] RegEx I am reading the documentation, and it says that match and replace are only for air 1.0 and they have that nasty trilobal air logo. What the heck If that is the case then why are they running in the flash player? ___ Flashcoders

Re: [Flashcoders] Regex

2009-05-04 Thread Anthony Pace
Not quite what I was looking for, but thank you for the link. I know it is based on the ECMA-262 spec, taking care of the spec question; yet, I really want to know what this implementation can and can't do well. Is there a break down, stress test comparison, on what is faster to do on your

RE: [Flashcoders] Regex

2009-05-04 Thread Merrill, Jason
I really want to know what this implementation can and can't do well. I'd use Grant's RegExr tool to try it out. I think there are so many possibilities, might be hard for any one person to document capabilities to the extent you're looking for. Jason Merrill Bank of America Global

Re: [Flashcoders] Regex

2009-05-04 Thread Karl DeSaulniers
Is this what your looking for? I ran across this looking for CSS tutorials. :) http://www.visibone.com/products/bbk14-15_425.html Karl DeSaulniers Design Drumm http://designdrumm.com On May 4, 2009, at 10:14 AM, Anthony Pace wrote: Not quite what I was looking for, but thank you for the

[Flashcoders] Regex

2009-05-03 Thread Anthony Pace
Is there anywhere I can get a complete and highly detailed spec for the AS3 implementation of Regular expressions? I know a enough to be pretty dangerous; yet, I am looking to get much better. ___ Flashcoders mailing list

Re: [Flashcoders] Regex

2009-05-03 Thread Anthony Pace
Seriously... anyone? Anthony Pace wrote: Is there anywhere I can get a complete and highly detailed spec for the AS3 implementation of Regular expressions? I know a enough to be pretty dangerous; yet, I am looking to get much better. ___

Re: [Flashcoders] Regex

2009-05-03 Thread Karl DeSaulniers
Are you talking about the as3 cheat sheet? I have that file or link somewhere. Sent from losPhone On May 3, 2009, at 8:11 PM, Anthony Pace anthony.p...@utoronto.ca wrote: Seriously... anyone? Anthony Pace wrote: Is there anywhere I can get a complete and highly detailed spec for the

Re: [Flashcoders] Regex

2009-05-03 Thread Karl DeSaulniers
This might point you in the right direction. http://actionscriptcheatsheet.com/blog/ Karl DeSaulniers Design Drumm http://designdrumm.com On May 3, 2009, at 9:48 PM, Karl DeSaulniers wrote: Are you talking about the as3 cheat sheet? I have that file or link somewhere. Sent from losPhone

[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...

[Flashcoders] RegEx Tools?

2006-12-18 Thread Charles Parcell
All, I was hoping to get some insight on software tools to help build Regular Expressions. I have happened apon RegExBuddy and it seems very nice. But before I shell out $30 for it, I wanted to see what others use and see if there were any free alternatives. http://www.regexbuddy.com/

Re: [Flashcoders] Regex in JSFL?

2006-03-02 Thread Christian Giordano
Ryan Matsikas wrote: yes. I couldn't find any documentation and although it works I get an error as alert. var re = new RegExp(\[^\]+\,gi); var m_arr = re.exec(line); var m = m_arr[0]; var c_string = m.substr(1,m.length-2); fl.trace(found: +c_string); the string is correctly traced but I

Re: [Flashcoders] Regex in JSFL?

2006-03-02 Thread Christian Giordano
var re = new RegExp(\[^\]+\,gi); var m_arr = re.exec(line); var m = m_arr[0]; var c_string = m.substr(1,m.length-2); fl.trace(found: +c_string); I solved in this way: var re = new RegExp(\[^\]+\,gi); var m_arr = re.exec(line); if(m_arr){ var m = String(m_arr); var c_string =

Re: [Flashcoders] Regex in JSFL?

2006-03-02 Thread Ryan Matsikas
the proper way todo it would be var re = new RegExp(\[^\]+\,gi); var result = re.exec(line); while (result != null) { fl.trace(found: +c_result); var result = re.exec(line); } On 3/2/06, Christian Giordano [EMAIL PROTECTED] wrote: var re = new RegExp(\[^\]+\,gi); var m_arr =

Re: [Flashcoders] Regex in JSFL?

2006-03-02 Thread Ryan Matsikas
opps trace result not c_result On 3/2/06, Ryan Matsikas [EMAIL PROTECTED] wrote: the proper way todo it would be var re = new RegExp(\[^\]+\,gi); var result = re.exec(line); while (result != null) { fl.trace(found: +c_result); var result = re.exec(line); } On 3/2/06, Christian

Re: [Flashcoders] Regex in JSFL?

2006-03-02 Thread Christian Giordano
while (result != null) { fl.trace(found: +c_result); var result = re.exec(line); } it makes sense, thanks! chr -- ___ { Christian Giordano's site and blog @ http://cgws.nuthinking.com }

Re: [Flashcoders] regex needed

2006-02-14 Thread Michael Stuhr
matti bar zeev schrieb: How about this? import RegExp; var a:String = äur*?ß123.png; var goodname:RegExp = new RegExp ([^a-z0-9\\.], gi); var return_str:String = a.replace(goodname, _); var output_txt:TextField = new TextField (); output_txt.text = return_str; addChild

RE: [Flashcoders] regex needed

2006-02-14 Thread matti bar zeev
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Flashcoders mailing list Sent: Tuesday, February 14, 2006 10:17 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] regex needed Importance: Low matti bar zeev schrieb: How about this? import

Re: [Flashcoders] regex needed

2006-02-14 Thread Michael Stuhr
matti bar zeev schrieb: You are working on flex, right? oops, nope ?! no other way, as far as I know, to use RegExp but to use it with flex. so... you must be familiar with addcChild (). if not - check it out on the Help panel. Weird, I don't get any errors. are you sure the error come from

RE: [Flashcoders] regex needed

2006-02-14 Thread matti bar zeev
Ok, So I suggest you ask them in that case. Best of luck. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Flashcoders mailing list Sent: Tuesday, February 14, 2006 16:17 To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] regex needed

[Flashcoders] regex needed

2006-02-13 Thread Michael Stuhr
i'm trying to use Joey Leott's (Pavils Jurjans') RegExp for replacing BAD-strings in (to-be-uploaded) Filenames but had no success at all. can anyone give me some hints ? i have: code import RegExp; var a:String = 'äur*?ß.png'; var goodname:RegExp = new RegExp ('/[^a-z0-9_\\-\\.]/i', 'g',

Re: [Flashcoders] regex needed

2006-02-13 Thread David Rorex
On 2/13/06, Michael Stuhr [EMAIL PROTECTED] wrote: i'm trying to use Joey Leott's (Pavils Jurjans') RegExp for replacing BAD-strings in (to-be-uploaded) Filenames but had no success at all. can anyone give me some hints ? i have: code import RegExp; var a:String = 'äur*?ß.png'; var

Re: [Flashcoders] regex needed

2006-02-13 Thread Michael Stuhr
David Rorex schrieb: On 2/13/06, Michael Stuhr [EMAIL PROTECTED] wrote: i'm trying to use Joey Leott's (Pavils Jurjans') RegExp for replacing BAD-strings in (to-be-uploaded) Filenames but had no success at all. can anyone give me some hints ? i have: code import RegExp; var a:String =

[Flashcoders] Regex in JSFL?

2006-01-29 Thread keith
Does JSFL let you use Regular Expressions like you can in Javascript? -- Keith H -- ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] Regex in JSFL?

2006-01-29 Thread Ryan Matsikas
yes. On 1/29/06, keith [EMAIL PROTECTED] wrote: Does JSFL let you use Regular Expressions like you can in Javascript? -- Keith H -- ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com