const regex = /(&[A-Za-z]+?;)|(<.+?>)|(<\/\w+>)|([\w-]+)|([ ~!@#$%^&*()+=?:;"{}\[\]|,.\\/]+)/gm;
// Alternative syntax using RegExp constructor
// const regex = new RegExp('(&[A-Za-z]+?;)|(<.+?>)|(<\\\/\\w+>)|([\\w-]+)|([ ~!@#$%^&*()+=?:;"{}\\[\\]|,.\\\\\/]+)', 'gm')
const str = `This is more<p>Post server upgrade test on 9/13</p><p>Testing c360 release</p><p> </p><p><span title=\\"Deleted by Chris Courtney - 12/16/2015 3:22pm\\" class=\\"del cts-1 non-editable\\" data-mce-contenteditable=\\"false\\" data-time=\\"1450297379217\\" data-username=\\"Chris Courtney\\" data-userid=\\"4642\\" data-cid=\\"4\\">wifi</span><span title=\\"Inserted by Chris Courtney - 12/16/2015 3:23pm\\" class=\\"ins cts-1\\" data-time=\\"1450297385376\\" data-username=\\"Chris Courtney\\" data-userid=\\"4642\\" data-cid=\\"8\\">Life Preserver will</span> save <span title=\\"Inserted by Chris Courtney - 12/16/2015 3:23pm\\" class=\\"ins cts-1\\" data-time=\\"1450297399510\\" data-username=\\"Chris Courtney\\" data-userid=\\"4642\\" data-cid=\\"28\\">if the </span>internet cut<span title=\\"Inserted by Chris Courtney - 12/16/2015 3:23pm\\" class=\\"ins cts-1\\" data-time=\\"1450297404606\\" data-username=\\"Chris Courtney\\" data-userid=\\"4642\\" data-cid=\\"35\\">s </span>out<span title=\\"Inserted by Chris Courtney - 12/16/2015 3:23pm\\" class=\\"ins cts-1\\" data-time=\\"1450297409071\\" data-username=\\"Chris Courtney\\" data-userid=\\"4642\\" data-cid=\\"42\\">.</span><span title=\\"Deleted by Chris Courtney - 12/16/2015 3:23pm\\" class=\\"del cts-1 non-editable\\" data-mce-contenteditable=\\"false\\" data-time=\\"1450297406872\\" data-username=\\"Chris Courtney\\" data-userid=\\"4642\\" data-cid=\\"37\\"> test</span></p><p> </p><p>The Subject Property is owned by the Federal Deposit Insurance Corporation (FDIC) and consists of 10 Acres acres and is located on the [N/E/S/W] side of 440 Wheelers Farms Road, approximately [###] feet [N/E/S/W] of the intersection of between[STREETNAME] and [].porperty ocne upon a tmie The Subject Property is not currently occupied by [BRIEFLY DESCRIBE BUILDING, OCCUPANT AND USE]. This is me entering new text into 2.1. This is a bullet. Type text 123 spelling</p><p> </p><p>The Subject Property is owned by the <span title=\\"Deleted by Chris Courtney\\" class=\\"trackChanges\\">Federal Deposit Insurance Corporation</span> (FDIC) and consists of 10 Acres acres and is located on the [N/E/S/W] side of 440 Wheelers Farms Road, approximately [###] feet [N/E/S/W] of the intersection of between[STREETNAME] and []. The Subject Property is not currently occupied by [BRIEFLY DESCRIBE BUILDING, OCCUPANT AND USE]. This is me entering new text into 2.1.</p><p> </p><p>This is a bullet.EDR order right after (discussed geocoding concerns, we're all set there) test</p><p> </p><p>Type text 123 spelling The Subject Property is owned by the Federal Deposit Insurance Corporation (FDIC) and consists of 10 Acres acres and is located on the [N/E/S/W] side of 440 Wheelers Farms Road, approximately [###] feet [N/E/S/W] of the intersection of<span title=\\"Added by Chris Courtney\\" class=\\"trackChanges\\">/</span><span title=\\"Deleted by Chris Courtney\\" class=\\"trackChanges\\"> </span>between[STREETNAME] and [].</p><p> </p><p> </p><p>The Subject Property is not currently occupied by [BRIEFLY DESCRIBE BUILDING, OCCUPANT AND USE].</p><p>This is me entering new text into 2.1. test</p><p> </p><p>This is a bullet.</p><p> </p><p>Type text 123 spellingThe Subject Property is owned by the Federal Deposit Insurance Corporation (FDIC) and consists of 10 Acres acres and is located on the [N/E/S/W] side of 440 Wheelers Farms Road, approximately [###] feet [N/E/S/W] of the intersection of between[STREETNAME] and [].</p><p> </p><p> </p><p>The Subject Property is not currently occupied by [BRIEFLY DESCRIBE BUILDING, OCCUPANT AND USE].</p><p>This is me entering new text into 2.1.</p><p> </p><p>This is a bullet.</p><p> </p><p>Type text 123 spellingThe Subject Property is owned by the Federal Deposit Insurance Corporation (FDIC) and consists of 10 Acres acres and is located on the [N/E/S/W] side of 440 Wheelers Farms Road, approximately [###] feet [N/E/S/W] of the intersection of between[STREETNAME] and [].</p><p> </p><p> </p><p>The Subject Property is not currently occupied by [BRIEFLY DESCRIBE BUILDING, OCCUPANT AND USE].</p><p>This is me entering new text into 2.1.</p><p> </p><p>This is a bullet.</p><p> </p><p>Type text 123 spellingThe Subject Property is owned by the Federal Deposit Insurance Corporation (FDIC) and consists of 10 Acres acres and is located on the [N/E/S/W] side of 440 Wheelers Farms Road, approximately [###] feet [N/E/S/W] of the intersection of between[STREETNAME] and [].</p><p> </p><p> </p><p>The Subject Property is not currentl<span title=\\"Inserted by Chris Courtney - 06/12/2015 2:40pm\\" class=\\"ins cts-1\\" data-time=\\"1434134407587\\" data-username=\\"Chris Courtney\\" data-userid=\\"4642\\" data-cid=\\"2\\">y</span> <span title=\\"Inserted by Chris Courtney - 06/12/2015 2:40pm\\" class=\\"ins cts-1\\" data-time=\\"1434134414659\\" data-username=\\"Chris Courtney\\" data-userid=\\"4642\\" data-cid=\\"3\\">this is a test. </span>occupied by [BRIEFLY DESCRIBE BUILDING, OCCUPANT AND USE].</p><p>This is me entering new text into 2.1.</p><p> </p><p>This is a bullet.</p><p> </p><p>Type text 123 spelling</p><p> </p><p>2014 Schultz Motors of Milan<br> 2009-2008 Dive Rite<br> Procom Driving Services<br> Schultz Motors of Milan - New and Used<br> Schultz Motors of Milan -Part and Service<br> 2004-2003 Adventure Driving<br> Dive Rite<br> Procom Driving Services<br> Schultz Motors of Milan - New and Used<br> Schultz Motors of Milan -Part and Service<br> 1999-1998 Dive Rite<br> Procom Driving Services<br> Schultz Motors of Milan - New and Used<br> 1994-1983 Schultz Motors<br> 1979-1967 Bruckner Oldsmobile</p><p> </p><p> 132543467</p><p> </p><p> </p><p> </p><p> </p>Heh?`;
const subst = `|`;
// The substituted value will be contained in the result variable
const result = str.replace(regex, subst);
console.log('Substitution result: ', result);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for JavaScript, please visit: https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions