# Regex Pros? How To: Find consecutive strings that come straight after each other

**URL:** <https://forum.kirupa.com/t/regex-pros-how-to-find-consecutive-strings-that-come-straight-after-each-other/259199>\
**Category:** Uncategorized\
**Created:** [May 1, 2008, 10:50pm UTC](https://forum.kirupa.com/t/regex-pros-how-to-find-consecutive-strings-that-come-straight-after-each-other/259199 "2008-05-01T22:50:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nineteen](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/nineteen/32/2679_2.png) [@Nineteen](https://forum.kirupa.com/u/Nineteen)\
**Post date:** [May 1, 2008, 10:50pm UTC](https://forum.kirupa.com/t/regex-pros-how-to-find-consecutive-strings-that-come-straight-after-each-other/259199/1 "2008-05-01T22:50:03Z")

</div>

Hey I need a regular expression to find a string that is repeated one after the other and replace.

Eg: Consider I had the string -  
[BREAKTOBEADDEDHERE][BREAKTOBEADDEDHERE][BREAKTOBEADDEDHERE]Home Buzz Tour Download Manifesto FAQ Blog Contact Interclue 1.5 - Your Personal Link Preview Multitool Before you click the link Hover your mouse pointer over the link, and a Linkclue icon will appear.[BREAKTOBEADDEDHERE]Rest your…

What I need is a regular expression to find and replace [BREAKTOBEADDEDHERE] that comes one or more times after itself… and replace it with one [BREAKTOBEADDEDHERE]

So it would replace and that string above would look like:  
[BREAKTOBEADDEDHERE]Home Buzz Tour Download Manifesto FAQ Blog Contact Interclue 1.5 - Your Personal Link Preview Multitool Before you click the link Hover your mouse pointer over the link, and a Linkclue icon will appear.[BREAKTOBEADDEDHERE]Rest your…

Any ideas :D?
