Posts Tagged regular expression

The Size of Empty

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

I was reminded about the flash.sampler API by Grant Skinner’s recent post about it. While only available in the debug player, it can still tell us some valuable information about what goes on in the release player. Today I’m using the getSize function to find out how much memory overhead various classes impose, even when they are empty.

Read the rest of this article »

15 Comments

Simple Regular Expressions

Tags: , ,

Lately I’ve been seeing a lot of AS3 code that uses regular expressions where the normal methods of the String class would seem to suffice. It seems common among programmers of all languages to catch on to new trends even when they do not particularly apply to the task at hand. For example, a new C++ or Java programmer may use templates or generics even for classes where only one data type will likely ever be used. I don’t know why programmers do this and I won’t attempt to tackle such a topic. Instead, I’ll do a test to show why this is a bad idea from a performance perspective.

Read the rest of this article »

2 Comments

RegExp In An Anonymous Function

Tags: ,

Regular expressions are downright handy for a variety of string processing tasks. They are so handy that they are built straight in to the language in the form of the /regexpgoeshere/ syntax. Well, usually…

Read the rest of this article »

6 Comments