Screen2.0

 
 
 

hints & tips // 2008.03.28 08:15:43 [hh]

Online-Tool zum Testen von regulären Ausdrücken in "Flex"

Um reguläre Ausdrücke interaktiv zu testen, benutzen Programmierer gerne kleine Tools, welche Ausdruck, Test-Text und Ergebnisse unmittelbar visualisieren. Grant Skinner (Urheber des Flash-Wörterbuch-Tools "Spelling Plus Library") hat ein entsprechendes kostenloses Online-Tool für Flex online gestellt.

Autor Grant Skinner zu seinem kleinen Tool:

"RegExr is an online tool for editing and testing Regular Expressions (RegExp / RegEx). It provides a simple interface to enter RegEx expressions, and visualize matches in real-time editable source text. It also provides a handy RegExp snippet sidebar with descriptions and usage examples to make it easier to learn Regular Expressions through trial and error.

It isn't as powerful as a product like RegExBuddy, but it has the advantage of being online and free. I will be releasing a free desktop version for Mac OSX and Windows built with AIR in the next day or two.

So far this has only taken a day of development, and the main app is only 150 lines of code. Flex 3 makes this kind of app so darn simple to put together.
RegExr is built with Flex 3, and uses ActionScript 3's built in RegExp engine. As with most engines, the AS3 RegExp implementation isn't perfect, so you are likely to encounter some limitations and oddities. Likewise, RegExr is very much beta software (did I mention it was developed in a day?), and currently has no error handling whatsoever, so it'll probably have a few quirks of its own.
RegExr uses an extension of the TextHilighter class that comes with the Spelling Plus Library. We will be including the RegExpHighlighter class with a future release of SPL.

If you encounter any issues using RegExr, would like to request a feature, or have a snippet you'd like to see added to the snippets pane, leave a comment below."

Weitere Informationen: gskinner.com/ RegExr

 

Werbung