Hi, how to replace unknow numbers of '' like '_______________________' with just ''?
preg_replace? Anyone already have a pattern written can share?
Thanks!
Are you talking about regular underscores? If so..
preg_replace('/_{2,}/', '_', $string)
Or, if you're feeling lazy and want to type even less:
preg_replace('/_+/', '_', $string)
Thanks! It works great.