Jump to content

detecting word wrap, new line characters


clem_c_rock

Recommended Posts

Hello,

I have a Flash application that's sending data from a simple input dynamic text field to a php script that saves it to a database. I then retrieve the data from the database and export it to a csv file. I am having problems w/ the wrapped text from the flash application causing the csv file to display the text in a newline.

When I try to detect the usual newline characters, (IE. \n, \r, \n\r) I am not finding any in the text.

here's the line of php code i'm using to try to detect any newline chars:

[code]
if(preg_match("#[\n|\r|\r\n][ ]*$#", $row_export['data_dump'] ) ){ echo "Newline characters found!"; }else{ echo "NO NEWLINES OR CARRIAGE RETURNS"; }
[/code]



Is there any different newline or wrap characters that I could be testing for?

Thanks,
Clem C
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.