Menu

1 / 2

Stop Testing Regex in Your Browser Console Use This Free Tool Instead

DEV Community: webdev·Muhammad Awais·5 months ago
#Ffzs97n5
#dev#match#test#regex#article
Reading 0:00
15s threshold

Every developer has done this at least once.

You need a regex pattern. You open the browser console, type something like:

/^ [ \ w . - ] + @[ \ w . - ] + \ . \ w { 2 ,} $ / . test ( " [email protected] " )

Enter fullscreen mode

Exit fullscreen mode

It returns true . Great. But does it handle edge cases? What about [email protected] ? What about an empty string? What about unicode characters in the local part?

So you modify the pattern. Test again. Modify. Test. Realize you don't actually understand why the {2,} is there. Open a Stack Overflow tab. Lose 40 minutes.

There's a better way.

What I Actually Use Now

I built a free browser-based regex tester at WebToolsHub that handles the parts the browser console can't.

Here's what it does differently:

Live match highlighting as you type your pattern, every match in the test string gets highlighted in real time.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.