Jump to content

Recommended Posts

Is anyone else noticing unexpected behavior with regex functions like preg_match() etc. on codepad.viper-7.com?

A few tests I have performed have not shown any results at all.

A pattern like '~.*~'; isn't matching anything when the $subject argument is certain things, other times it will match everything in the $subject argument, very strange.

I haven't ran enough tests to determine what exactly in the $subject arguments is causing this, just wondering if anyone else has experienced this.

Do you have an example we can use to reproduce the problem? Saying "sometimes it doesn't work" is about as ambiguous as saying there's a security hole in IE6.

 

heh, yeah sure.

 

http://codepad.viper-7.com/20Gd51

 

it seems that tags are now stripped or something of the sort.

The behavior seems kind of random to me, as sometimes it parses the string fine and sometimes its stripped.

This behavior did not occur until maintenance was performed on the site about 2 weeks ago.

 

http://codepad.viper-7.com/N4SqUv

 

You should put it in plain text mode when you test things by sending the appropriate header.

 

right but I shouldn't need to do that every time.

things like this used to work fine on codepad.viper-7.

I guess they changed the content-type from text/plain

 

as far as I know it's always been text/html output.  There used to be a tab at the top that let you switch between html or plain text and that seems to be gone now.  Maybe it remembered your selection so it went to plain text for you by default, not sure if it did that or not.

 

as far as I know it's always been text/html output.  There used to be a tab at the top that let you switch between html or plain text and that seems to be gone now.  Maybe it remembered your selection so it went to plain text for you by default, not sure if it did that or not.

 

very well could have, I guess I will have to use a header to get to the proper content-type.

Thanks for the help.

It used to default to the HTML view, then was changed to the Source view. Now with the new design it is back to the HTML view.

 

I have always just forced a plain text output from within the code, with things like header("Content-Type: text/plain") or ini_set("default_mimetype", "text/plain").

It used to default to the HTML view, then was changed to the Source view. Now with the new design it is back to the HTML view.

 

I have always just forced a plain text output from within the code, with things like header("Content-Type: text/plain") or ini_set("default_mimetype", "text/plain").

 

yeah, I have started to do the same now. thanks Sal

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.