AviNahum Posted February 26, 2009 Share Posted February 26, 2009 hey... i got problem with this code: $post_eregi = $this->post['post']; $closed_text = "*נעול*"; $the_e = eregi($closed_text, $post_eregi); if ( $the_e ) { $this->topic['state'] = 'closed'; } i got this error: Warning: eregi() [function.eregi]: REG_BADRPT in /home/aviavi/domains/avi.one-serv.net/public_html/oh/sources/lib/post_reply_post.php on line 243 in this line: $the_e = eregi($closed_text, $post_eregi); and i cant solve that... this code run in invision power board system... thanks to helpers... Link to comment https://forums.phpfreaks.com/topic/147051-help-with-eregi/ Share on other sites More sharing options...
scarhand Posted February 26, 2009 Share Posted February 26, 2009 http://www.phpfreaks.com/forums/index.php/board,43.0.html is the proper forum for regex REG_BADRPT is caused by an invalid regular expression a * character is a metacharacter and is not to be used as a delimiter Link to comment https://forums.phpfreaks.com/topic/147051-help-with-eregi/#findComment-772008 Share on other sites More sharing options...
AviNahum Posted February 26, 2009 Author Share Posted February 26, 2009 can you help me solve it? Link to comment https://forums.phpfreaks.com/topic/147051-help-with-eregi/#findComment-772014 Share on other sites More sharing options...
AviNahum Posted February 26, 2009 Author Share Posted February 26, 2009 even if i replace that with "-" it's wont work Link to comment https://forums.phpfreaks.com/topic/147051-help-with-eregi/#findComment-772016 Share on other sites More sharing options...
premiso Posted February 26, 2009 Share Posted February 26, 2009 eregi is being depreciated. Better to use preg_match What is the goal of the script. Please provide what is being input and what you expect the output. Also what are possible values of $post_eregi ? $the_e = preg_match("~(\*נעול\*)~i", $post_eregi); Give that a try and see if it works for you. Edit, it converted that text to the ascii, replace that with everything between the *'s Link to comment https://forums.phpfreaks.com/topic/147051-help-with-eregi/#findComment-772028 Share on other sites More sharing options...
AviNahum Posted February 26, 2009 Author Share Posted February 26, 2009 thanks! i tried to use preg_math and it's works perfect! Link to comment https://forums.phpfreaks.com/topic/147051-help-with-eregi/#findComment-772043 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.