Jump to content

codepad.viper regular expression behavior


AyKay47

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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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").

Link to comment
Share on other sites

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

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.