need a regex for matching repeating lines of symbols (example: ------------- or *****************)

Posted by Haroldo on Stack Overflow See other posts from Stack Overflow or by Haroldo
Published on 2010-04-18T18:32:43Z Indexed on 2010/04/18 18:43 UTC
Read the original article Hit count: 224

Filed under:
|

I want to be able to remove linebreaks etc that people make by using recurring characters, for example:

****************************************************
----------------------------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

etc

i'd like to not have to specify which characters it will match, maybe all that are NOT \w characters?

also note they will not always start/end on a new line..

is this possible?

© Stack Overflow or respective owner

Related posts about php

Related posts about regex