[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

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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] [image:
Facebook] [image:
Twitter]


On Tue, Oct 20, 2009 at 3:57 AM, Juan Pablo Califano <
califa010.flashcod...@gmail.com> wrote:

> 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 stuff. So
> 0xFEFF is the last value before that range. Not sure if the way the regex
> behaves is a bug or a feature, really, but you can probably get by with
> something like this:
>
> var testIsArabic:Boolean = /[\u0627-\ufeff]/.test(str.charAt(0));
>
> Cheers
> Juan Pablo Califano
>
> 2009/10/19 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, returns false
> >
> > NOTE: the str.charAt(0) is 0627
> >
> > any ideas?
> >
> > cheers,
> >
> > MaTT
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 stuff. So
0xFEFF is the last value before that range. Not sure if the way the regex
behaves is a bug or a feature, really, but you can probably get by with
something like this:

var testIsArabic:Boolean = /[\u0627-\ufeff]/.test(str.charAt(0));

Cheers
Juan Pablo Califano

2009/10/19 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, returns false
>
> NOTE: the str.charAt(0) is 0627
>
> any ideas?
>
> cheers,
>
> MaTT
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 wrote:

> 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, returns false
>
> NOTE: the str.charAt(0) is 0627
>
> any ideas?
>
> cheers,
>
> MaTT
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[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, returns false

NOTE: the str.charAt(0) is 0627

any ideas?

cheers,

MaTT
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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) {
case myRegEx:
break;
}

Otherwise cant you swithc on the result of the executed regex?

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] regex in switch statement

2009-05-15 Thread Sidney de Koning

HI 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) {
case myRegEx:
break;
}

Otherwise cant you swithc on the result of the executed regex?

Let me know if it helps,

Sid

On May 15, 2009, at 4:52 PM, Mendelsohn, Michael wrote:

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 ("W3") :
break;
case ("M1") :
case ("M2") :
case ("M3") :
break;
case ("K1") :
case ("K2") :
case ("K3") :
break;
}
}

...into something shorter like this:
switch(str){
case(/(W|M|K)\d/i):
break;
}




I think its better practice to define that regex in a variable and

switch on that variable.


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Sidney de Koning - be a geek, in rockstar style!
Flash / AIR Developer @ www.funky-monkey.nl
Technical Writer @ www.insideria.com

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 ("W3") :
break;
case ("M1") :
case ("M2") :
case ("M3") :
break;
case ("K1") :
case ("K2") :
case ("K3") :
break;
}
}

...into something shorter like this:
switch(str){ 
case(/(W|M|K)\d/i):
break;
}



> I think its better practice to define that regex in a variable and  
switch on that variable.


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 around and haven't found anything  
specifically for actionscript.


Thanks,
- MM

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Sidney de Koning - be a geek, in rockstar style!
Flash / AIR Developer @ www.funky-monkey.nl
Technical Writer @ www.insideria.com

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] regex in switch statement

2009-05-15 Thread Mendelsohn, Michael
Hi list...

Is it possible to use a regular expression as a case in a switch statement?  
I've been searching around and haven't found anything specifically for 
actionscript.

Thanks,
- MM

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] RegEx

2009-05-11 Thread Anthony Pace
Thanks for confirming it.  That is one heck of a mistake/confusing bit  
in the documentation.


I was looking at  
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/String.html#match()


Muzak wrote:

Must be a mistake. There's no such mention here:
http://livedocs.adobe.com/flex/3/langref/String.html#match()

- Original Message - From: "Anthony Pace" 


To: "Flash Coders List" 
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 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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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  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
> flash player?
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] RegEx

2009-05-09 Thread Muzak

Must be a mistake. There's no such mention here:
http://livedocs.adobe.com/flex/3/langref/String.html#match()

- Original Message - 
From: "Anthony Pace" 

To: "Flash Coders List" 
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 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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 flash player?

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 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 own vs using regular expressions?  I know the  
implementation of word boundaries is supposedly lacking (according  
to a comment made by GSkinner); yet, what else should I be looking  
out for?


Thanks,
Anthony


Karl DeSaulniers wrote:

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

On May 3, 2009, at 8:11 PM, Anthony Pace  
 wrote:



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.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 Learning 
Shared Services Solutions Development 

Monthly meetings on the Adobe Flash platform for rich media experiences
- join the Bank of America Flash Platform Community 



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/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 own vs using regular expressions?  I know the implementation of 
word boundaries is supposedly lacking (according to a comment made by 
GSkinner); yet, what else should I be looking out for?


Thanks,
Anthony


Karl DeSaulniers wrote:

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

On May 3, 2009, at 8:11 PM, Anthony Pace  
wrote:



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.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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

On May 3, 2009, at 8:11 PM, Anthony Pace   
wrote:



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.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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   
wrote:



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.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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...
>
> http://gskinner.com/RegExr/
>
> Glen
>
> Sidney de Koning wrote:
>
> > 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 is
> > the way it should.
> >
> > Thanks!
> >
> > Sidney
> >
> >
> > On Apr 22, 2008, at 3:35 PM, Wagner Amaral wrote:
> >
> > 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:
> > >
> > > http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/RegExp.html#RegExp()
> > >
> > >
> > >
> > > On Tue, Apr 22, 2008 at 9:13 AM, Sidney de Koning <
> > > [EMAIL PROTECTED]>
> > > wrote:
> > >
> > > 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 start with a capital i have a problem.
> > > > This is
> > > > my pattern:
> > > >
> > > > var regObj:RegExp = new RegExp( "^.*[[:upper:]a-z].*"+
> > > > searchField_txt.text +".*" );
> > > >
> > > > My xml consist of country names, Andorra, Angola, Anguilla, Cuba,
> > > > Cyprus,
> > > > Denmark etc.
> > > >
> > > > What I want to do is this; when i type: an it returns a list of
> > > > Andorra,
> > > > Angola, Anguilla. But when i type in an extra g, so now the word in
> > > > my
> > > > textfield becomes: "ang" it should return the list Angola, Anguilla.
> > > > The
> > > > pattern i have works a bit, but not quite. And my knowledge of RegEx
> > > > is only
> > > > exsisting since this morning. So what i want the RegEx to do is
> > > > allow me to
> > > > search the text, no matter if i type in lower-/uppercase and in the
> > > > correct
> > > > order.
> > > >
> > > > Is there a RegEx rockstar who can help me on this?
> > > >
> > > > Thanks in advance,
> > > >
> > > > Sidney de Koning
> > > > ___
> > > > Flashcoders mailing list
> > > > Flashcoders@chattyfig.figleaf.com
> > > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > > >
> > > > ___
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > >
> > >
> >
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> >
> >
> --
>
> Glen Pike
> 01326 218440
> www.glenpike.co.uk 
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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 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 
is the way it should.


Thanks!

Sidney


On Apr 22, 2008, at 3:35 PM, Wagner Amaral wrote:


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:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/RegExp.html#RegExp() 





On Tue, Apr 22, 2008 at 9:13 AM, Sidney de Koning 
<[EMAIL PROTECTED]>

wrote:


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 start with a capital i have a problem. 
This is

my pattern:

var regObj:RegExp = new RegExp( "^.*[[:upper:]a-z].*"+
searchField_txt.text +".*" );

My xml consist of country names, Andorra, Angola, Anguilla, Cuba, 
Cyprus,

Denmark etc.

What I want to do is this; when i type: an it returns a list of 
Andorra,

Angola, Anguilla. But when i type in an extra g, so now the word in my
textfield becomes: "ang" it should return the list Angola, Anguilla. 
The
pattern i have works a bit, but not quite. And my knowledge of RegEx 
is only
exsisting since this morning. So what i want the RegEx to do is 
allow me to
search the text, no matter if i type in lower-/uppercase and in the 
correct

order.

Is there a RegEx rockstar who can help me on this?

Thanks in advance,

Sidney de Koning
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders





___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/RegExp.html#RegExp()



On Tue, Apr 22, 2008 at 9:13 AM, Sidney de Koning <[EMAIL PROTECTED]>
wrote:

> 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 start with a capital i have a problem. This is
> my pattern:
>
> var regObj:RegExp = new RegExp( "^.*[[:upper:]a-z].*"+
> searchField_txt.text +".*" );
>
> My xml consist of country names, Andorra, Angola, Anguilla, Cuba, Cyprus,
> Denmark etc.
>
> What I want to do is this; when i type: an it returns a list of Andorra,
> Angola, Anguilla. But when i type in an extra g, so now the word in my
> textfield becomes: "ang" it should return the list Angola, Anguilla. The
> pattern i have works a bit, but not quite. And my knowledge of RegEx is only
> exsisting since this morning. So what i want the RegEx to do is allow me to
> search the text, no matter if i type in lower-/uppercase and in the correct
> order.
>
> Is there a RegEx rockstar who can help me on this?
>
> Thanks in advance,
>
> Sidney de Koning
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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  
is the way it should.


Thanks!

Sidney


On Apr 22, 2008, at 3:35 PM, Wagner Amaral wrote:

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:

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/RegExp.html#RegExp()



On Tue, Apr 22, 2008 at 9:13 AM, Sidney de Koning <[EMAIL PROTECTED] 
>

wrote:


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 start with a capital i have a  
problem. This is

my pattern:

var regObj:RegExp = new RegExp( "^.*[[:upper:]a-z].*"+
searchField_txt.text +".*" );

My xml consist of country names, Andorra, Angola, Anguilla, Cuba,  
Cyprus,

Denmark etc.

What I want to do is this; when i type: an it returns a list of  
Andorra,
Angola, Anguilla. But when i type in an extra g, so now the word in  
my
textfield becomes: "ang" it should return the list Angola,  
Anguilla. The
pattern i have works a bit, but not quite. And my knowledge of  
RegEx is only
exsisting since this morning. So what i want the RegEx to do is  
allow me to
search the text, no matter if i type in lower-/uppercase and in the  
correct

order.

Is there a RegEx rockstar who can help me on this?

Thanks in advance,

Sidney de Koning
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders





___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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

2008/4/22, Sidney de Koning <[EMAIL PROTECTED]>:
>
> 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 start with a capital i have a problem. This is
> my pattern:
>
> var regObj:RegExp = new RegExp( "^.*[[:upper:]a-z].*"+
> searchField_txt.text +".*" );
>
> My xml consist of country names, Andorra, Angola, Anguilla, Cuba, Cyprus,
> Denmark etc.
>
> What I want to do is this; when i type: an it returns a list of Andorra,
> Angola, Anguilla. But when i type in an extra g, so now the word in my
> textfield becomes: "ang" it should return the list Angola, Anguilla. The
> pattern i have works a bit, but not quite. And my knowledge of RegEx is only
> exsisting since this morning. So what i want the RegEx to do is allow me to
> search the text, no matter if i type in lower-/uppercase and in the correct
> order.
>
> Is there a RegEx rockstar who can help me on this?
>
> Thanks in advance,
>
> Sidney de Koning
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[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 start with a capital i have a problem.  
This is my pattern:


var regObj:RegExp = new RegExp( "^.*[[:upper:]a-z].*"+  
searchField_txt.text +".*" );


My xml consist of country names, Andorra, Angola, Anguilla, Cuba,  
Cyprus, Denmark etc.


What I want to do is this; when i type: an it returns a list of  
Andorra, Angola, Anguilla. But when i type in an extra g, so now the  
word in my textfield becomes: "ang" it should return the list Angola,  
Anguilla. The pattern i have works a bit, but not quite. And my  
knowledge of RegEx is only exsisting since this morning. So what i  
want the RegEx to do is allow me to search the text, no matter if i  
type in lower-/uppercase and in the correct order.


Is there a RegEx rockstar who can help me on this?

Thanks in advance,

Sidney de Koning
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


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

Thoughts?

Thanks,
Charles P.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


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 }
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


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 Giordano <[EMAIL PROTECTED]> wrote:
> >
> > > 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 = m.substr (1,m.length-2);
> > fl.trace("found: "+c_string);
> > }
> >
> > any cleaner?
> >
> >
> > cheers, chr
> > --
> > ___
> > { Christian Giordano's site and blog @ http://cgws.nuthinking.com }
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
>
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


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.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 = m.substr(1,m.length-2);
> fl.trace("found: "+c_string);
> }
>
> any cleaner?
>
>
> cheers, chr
> --
> ___
> { Christian Giordano's site and blog @ http://cgws.nuthinking.com }
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


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 = m.substr(1,m.length-2);
fl.trace("found: "+c_string);
}

any cleaner?


cheers, chr
--
___
{ Christian Giordano's site and blog @ http://cgws.nuthinking.com }
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.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 got the alert "m_arr has no 
properties". Which one should be the way to avoid the error?



Thanks, chr
--
___
{ Christian Giordano's site and blog @ http://cgws.nuthinking.com }
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


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
  Importance: Low


  "You are working on flex, right?
  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."

  Not true.  Joey Lott's and Pavils Jurjans' RegExp class is just AS2 and
will
  of course work with Flash.

  Jim Kremens

  On 2/14/06, matti bar zeev <[EMAIL PROTECTED]> wrote:
  >
  > You are working on flex, right?
  > 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 this
lines
  > of code?
  >   -Original Message-
  >   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 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 (output_txt)
  >   >
  >   >
  >
  >   nope ... same problem: type mismatch!
  >
  >   btw: what is addChild () ???
  >
  >   micha
  >
  >   ___
  >   Flashcoders@chattyfig.figleaf.com
  >   To change your subscription options or search the archive:
  >   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  >
  >   Brought to you by Fig Leaf Software
  >   Premier Authorized Adobe Consulting and Training
  >   http://www.figleaf.com
  >   http://training.figleaf.com
  >
  >
  > ___
  > Flashcoders@chattyfig.figleaf.com
  > To change your subscription options or search the archive:
  > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  >
  > Brought to you by Fig Leaf Software
  > Premier Authorized Adobe Consulting and Training
  > http://www.figleaf.com
  > http://training.figleaf.com
  >



  --
  Jim Kremens
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] regex needed

2006-02-14 Thread Jim Kremens
"You are working on flex, right?
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."

Not true.  Joey Lott's and Pavils Jurjans' RegExp class is just AS2 and will
of course work with Flash.

Jim Kremens

On 2/14/06, matti bar zeev <[EMAIL PROTECTED]> wrote:
>
> You are working on flex, right?
> 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 this lines
> of code?
>   -Original Message-
>   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 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 (output_txt)
>   >
>   >
>
>   nope ... same problem: type mismatch!
>
>   btw: what is addChild () ???
>
>   micha
>
>   ___
>   Flashcoders@chattyfig.figleaf.com
>   To change your subscription options or search the archive:
>   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>   Brought to you by Fig Leaf Software
>   Premier Authorized Adobe Consulting and Training
>   http://www.figleaf.com
>   http://training.figleaf.com
>
>
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>



--
Jim Kremens
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


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 this lines
of code?


as i said: i'm trying to get the RegExp class to work whihc is from Joey Lott 
(http://www.person13.com/) / Pavils Jurjans 
(http://www.jurjans.lv/flash/RegExp.html) 


micha

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] regex needed

2006-02-14 Thread matti bar zeev
You are working on flex, right?
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 this lines
of code?
  -Original Message-
  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 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 (output_txt)
  >
  >

  nope ... same problem: type mismatch!

  btw: what is addChild () ???

  micha

  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http://www.figleaf.com
  http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.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 (output_txt)




nope ... same problem: type mismatch!

btw: what is addChild () ???

micha

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] regex needed

2006-02-14 Thread matti bar zeev
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 (output_txt)


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Flashcoders
mailing list
Sent: Tuesday, February 14, 2006 00:14
To: flashcoders@chattyfig.figleaf.com
Subject: Re: [Flashcoders] regex needed
Importance: Low


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:
>>
>> 
>> import RegExp;
>>
>> var a:String = 'äur*?ß.png';
>> var goodname:RegExp = new RegExp ('/[^a-z0-9_\\-\\.]/i', 'g', 'i');
>> str.text = a.replace(goodname, '_');
>> 
>>
>> but the compiler says type mismatch in line 6 
>>
>>
>>
> Can you tell us which line is line 6? You only gave 5 lines of code...
>
>
count them. the compiler counts them too :-)
> also:
> 'a' is a string, and you are calling 'a.replace()'. Is that correct? (I
> don't know how the regexp library works exactly, so it may be)
>
it should be. RegExp adds some functions to String() by prototype, sth.
like String().replace().
it works (or should work) simpilar like preg_replace() in php.

any ideas ?

micha



micha
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


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:


import RegExp;

var a:String = 'äur*?ß.png';
var goodname:RegExp = new RegExp ('/[^a-z0-9_\\-\\.]/i', 'g', 'i');
str.text = a.replace(goodname, '_');


but the compiler says type mismatch in line 6 




Can you tell us which line is line 6? You only gave 5 lines of code...

  

count them. the compiler counts them too :-)

also:
'a' is a string, and you are calling 'a.replace()'. Is that correct? (I
don't know how the regexp library works exactly, so it may be)
  
it should be. RegExp adds some functions to String() by prototype, sth. 
like String().replace().

it works (or should work) simpilar like preg_replace() in php.

any ideas ?

micha



micha
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


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:
>
> 
> import RegExp;
>
> var a:String = 'äur*?ß.png';
> var goodname:RegExp = new RegExp ('/[^a-z0-9_\\-\\.]/i', 'g', 'i');
> str.text = a.replace(goodname, '_');
> 
>
> but the compiler says type mismatch in line 6 
>
>
Can you tell us which line is line 6? You only gave 5 lines of code...

also:
'a' is a string, and you are calling 'a.replace()'. Is that correct? (I
don't know how the regexp library works exactly, so it may be)

-David R
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


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


import RegExp;

var a:String = 'äur*?ß.png';
var goodname:RegExp = new RegExp ('/[^a-z0-9_\\-\\.]/i', 'g', 'i');
str.text = a.replace(goodname, '_');


but the compiler says type mismatch in line 6 


any hints appreciated

micha

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


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
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[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