List format
Format a list using regular expressions

This content is licensed under Creative Commons Attribution/Share-Alike License 3.0 (Unported). That means you may freely redistribute or modify this content under the same license conditions and must attribute the original author by placing a hyperlink from your site to this work https://planetcalc.com/1902/. Also, please do not modify any references to the original work (if any) contained in this content.
Once upon a time I've created calculator to unleash the power of regular expressions - Regular expression tester. Now it is a time to use it for practical purposes (via calculator reuse supported by our engine).
Sometimes you need to format a list, given you by your client (if we are talking about software development), to something more suitable for your needs, like computer processing. Of course you can do it with copy-paste, but this is not our method. Our method is to make computer do this for you.
Calculator below lets computer to perform such sophisticated job as list formatting.
You need to insert source list, write regular expression to match, leave modifiers alone - since "g" is global search and "m" is multiline mode (so you can use "^" and "$" in your regexp), and write replacement text - the desired format. "Escape tags" allows you to see tags in output list (i.e. html, xml).
Default values used to illustrate the concept. Common list is transformed to the list of values enclosed by <i> tags.
Comments