RegEx Splitter A open-source, lightweight ASP.NET Core MVC application that splits a single-line JavaScript Regular Expression into multiple lines of code

RegEx Splitter

RegEx Splitter, also known as RegExSplitter, is a lightweight ASP.NET Core 2.1 MVC Web Application featuring a tiny JavaScript engine that splits a single-line JavaScript Regular Expression into multiple lines of code. The project was originally developed during a .NET Core programming course hosted in Rome, Italy: for this very reason, its main purpose is to serve as a demonstrative web application for the course students, which be also used as a boilerplate for small ASP.NET Core MVC projects by everyone.

If used as a ASP.NET Core 2.x MVC boilerplate, it does provide the following:

  • ASP.NET Core 2.1 framework.
  • MVC Support with C# controllers and Razor views.
  • Multi-Language support (english & italian) with fallback-to-english features and browser autodetect capabilities.
  • Bootstrap 4.x & JQuery 3.x with a different resource loading behaviour for   and   environments.
  • Opportunistic CDN approach using the   tag helpers to load external resources from the CDN with a local copy fallback when the CDN is down.

The full source code, released on MIT license, is freely available on the RegExSplitter GitHub project page.

However, since the project also offers a unique “regular expression splitting” feature that I couldn’t find anywhere else on the web, I also released it a stand-alone tool at the following URL:

The web application is currently hosted on a CentOS + NGINX machine using the .NET Core runtime for Linux (disclaimer: no Windows machine were harmed in the process).

RegEx Splitter is also part of the Ryadel.IO project, a collection of free online tools to help developers and system administrators to perform simple task to better fullfill their job.

Description

RegEx Splitter, as its name implies, is a Regular Expression splitter for JavaScript programmers: it splits any single-line JavaScript RegEx into multiple lines of code.

For example, let’s take the following JavaScript RegExp:

[/crayon] Although not being ”extremely long”, it can still cause some readability issues when placed in a standard JavaScript file. Unfortunately, JavaScript does not allow a native multi-line syntax for RegEx literals defined in such way (I wrote about such topic in this post). RegEx Splitter comes to the rescue, converting the above   into the following  :

[/crayon] That’s basically it. The tool also lets you configure some optional values, such as the maximum characters per line.

Usage

The best way to use RegEx Splitter is to go to the following URL:

However, you can also download/clone the GitHub project and run it locally, or fork it and play around with the source code.

Official Resources

RegEx Splitter

About Ryan

IT Project Manager, Web Interface Architect and Lead Developer for many high-traffic web sites & services hosted in Italy and Europe. Since 2010 it's also a lead designer for many App and games for Android, iOS and Windows Phone mobile devices for a number of italian companies. Microsoft MVP for Development Technologies since 2018.

View all posts by Ryan

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.