Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 13th February 2021, 00:30
elvira's Avatar
elvira elvira is offline
Senior Member
 
Join Date: Jan 2008
Slovenia
Posts: 172
Default preg_match(): error
Hello all,


need little help here


Warning: preg_match(): Unknown modifier '/' in /home/admin...........

This line:

function boundary($w,$s) {
return preg_match("/\b$w\b/i", $s, $w);
}
Reply With Quote
  #2  
Old 13th February 2021, 12:44
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
Using / as a delimiter means you also need to escape it here, like so: <\/>.
https://stackoverflow.com/questions/...known-modifier
__________________
Need HELP!? I can install:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. Multiple source code engines
  5. Linux Server Administration (security, cryptography/encryption, proxy, load balancer, custom ddos firewall)
Reply With Quote
  #3  
Old 13th February 2021, 13:55
elvira's Avatar
elvira elvira is offline
Senior Member
 
Join Date: Jan 2008
Slovenia
Posts: 172
Default
I use this and works


PHP Code:
function boundary($w,$s) {return preg_replace('/\b' preg_quote($w'/') . '\b/i'$s$w);} 
Reply With Quote
  #4  
Old 13th February 2021, 14:11
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
good
__________________
Need HELP!? I can install:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. Multiple source code engines
  5. Linux Server Administration (security, cryptography/encryption, proxy, load balancer, custom ddos firewall)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 12:00. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.