KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a string that may have a repeated character pattern, e.g. 'xyzzyxxyzzyxxyzzyx' I need to write a regex that would replace such string with its smallest repeated pattern: 'xyzzyxxyzzyxxyzzyx' becomes 'xyzzyx', 'abcbaccbaabcbaccbaabcbaccba' becomes 'abcbaccba'
Tags (comma-separated)
Save Edits
Cancel