Wilker 3 Denunciar post Postado Abril 25, 2005 tipo, eu sei q fazendo:/[^a]*/ieu estaria negando a letra A ou amas como eu faco pra negar uma string?? tipo, pra negar a palavra boca?pq c eu fizer:/[^boca]*/ieu estarei negando as letras b, o, c e a, e n negando a palavra boca... Compartilhar este post Link para o post Compartilhar em outros sites
Fabyo 66 Denunciar post Postado Abril 25, 2005 você tem que usar () subpadroes [] em listas é igual você falou vai negar as letras em si ja dentro de (string) nao ele negara o que tiver na string olha um exemplo pra você entender melhor: <?phpfunction convert_links($str) { $replace = ''.htmlentities('\\1').htmlentities('\\2').'' EOPHP; $str = preg_replace('#(http://)([^\s]*)#e', $replace, $str); return $str; } ?> Compartilhar este post Link para o post Compartilhar em outros sites