Help with Regular Expression

Página superior
Adjuntos:
Obtener este mensaje como un correo
+ (text/plain)
Eliminar este mensaje
Responder a este mensaje
Autor: Mike Starke
Fecha:  
Asunto: Help with Regular Expression
/_
/_I seem to be having a lot of trouble with what seems should be a simple regex.
/_
/_I have a database full of research paper abstracts and I would like to strip all newlines from them. This would include
/_\n, \r, and \r\n characters. However, if there are two consecutive newlines (i.e. new paragraph) I would like to keep
/_those in tact.
/_
/_I have written the script in PHP to pull each field from the database, perform said regex and then update the field
/_with the new data. All I need is a regex that works. I'm using the Perl compatible regex within PHP.
/_
/_Any help would be appreciated.
/_
Mr. Sinck has always proved to be a guru in regex for me.... David?