String Multi Replace: Replace multiple expressions in a single string

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 113 All time: 396 This week: 4Up
Version License JavaScript version Categories
str_multi_replace 1.0BSD License1.0Text processing


This package replace multiple expressions in a single string.

It alters the string replace prototype function to allow the regular expression parameters to be a set of regular expression objects, so the function will search and replace for all the specified expressions.

The replacement text may be either a single string or also a set texts that will replace the corresponding matching regular expression.

Innovation Award
JavaScript Programming Innovation award nominee
September 2015
Number 2

Prize: One book of choice by Packt
In JavaScript it is possible to change values in string replacing marks or regular expressions by replacement values.

If you want to perform multiple types of replacements you need to call the replace function multiple types.

This package changes the string object prototype function to allow replacing an array of expressions in a single call.

Manuel Lemos
Picture of Martin Barker
  Performance   Level  
Name: Martin Barker <contact>
Classes: 10 packages by
Country: United Kingdom
Age: 34
All time rank: 201 in United Kingdom
Week rank: 6 Up1 in United Kingdom Equal
Innovation award
Innovation award
Nominee: 6x

Winner: 4x

  Files folder image Files  
File Role Description
Accessible without login Plain text file Demo.js Example example of how to use.
Plain text file StringReplace.js Class Main File

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:396
This week:4Up