Development

Create, verify and visualize regular expressions with iHateRegex

Create, verify and visualize regular expressions with iHateRegex

Regular expressions, or regex, can be very powerful when it comes to find operations provided that programs or online services support them. Programs like TextConverter, PowerRename, or nnn support regular expressions, but using regular expressions can be intimidating or outright frustrating.

Take the following expression as an example: (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))3. If you are familiar with regular expressions, you may understand the expression right away. If you are not, you may have a hard time deciphering it (it detects IP addresses).

Crafting regular expressions can be very frustrating especially for users who just started to learn regular expressions.

The new website iHateRegex comes to the rescue. The site maintains a searchable database of regular expressions and includes a playground for testing regular expressions.

The search field on the project's startpage can be used to search the database of regular expressions. Select any to display the expression, example matches, and a visualization that highlights the expression's flow.

You can edit any of the regular expressions or example strings right away; results and the visualization are updated in real-time and it is quite easy to use the visualization and the matches to craft and verify regular expressions.

The playground works identical only that you are starting with a basic regular expression and visualization that you may modify to your liking. You may copy the expression or copy embed code, and even submit a new regular expression for evaluation and inclusion in the project's database.

Since you may edit any regular expression, you may also use copy and paste to copy regular expressions from other sites or applications to paste them on the iHateRegex site; this way, it is easy to edit, test and verify regular expressions.

Closing Words

There are plenty of sites on the Internet and programs that help understand, create and verify regular expressions. We reviewed the Windows software Regular Expression Coach in 2009 and it works to this day.

If there is one downside to iHateRegex it is the fact that you cannot just use the site if you are getting started. You need another resource such as Regexr or regular-expressions.info to learn the basics quickly. It would be great if the developer of the site would add some tutorials and quick help options to the site to assist users.

Now you: have you used regular expressions before?

Linux için En İyi 5 Arcade Oyunu
Günümüzde bilgisayarlar oyun oynamak için kullanılan ciddi makinelerdir. Yeni yüksek puanı alamazsan, ne demek istediğimi anlayacaksın. Bu yazıda, bug...
Wesnoth 1 Savaşı.13.6 Geliştirme Yayınlandı
Wesnoth 1 Savaşı.13.Geçen ay yayınlanan 6. sürüm, 1. sürümdeki altıncı geliştirme sürümüdür.13.x serisi ve özellikle kullanıcı arayüzü için bir dizi i...
Ubuntu 14'te League Of Legends Nasıl Kurulur.04
League of Legends hayranıysanız, bu, League of Legends koşusunu test etmeniz için bir fırsattır. Linux kullanıcısıysanız LOL'nin PlayOnLinux'ta destek...