preg-replace
Highlight search resuls with string part
i am using the code below to highlight the search results: $text = preg_replace(\"/\\b($word)\\b开发者_如何学Python/i\", \'<span class=\"highlight_word\">\\1</span>\', $text);[详细]
2023-04-10 13:26 分类:问答preg_replace REGEX
I wanted some help开发者_运维问答 regarding REGEX. I have the following in a string variable after scraping from a website.[详细]
2023-04-10 09:01 分类:问答PHP Remove url-"not allowed" characters from string
I have read through all the questions regarding this, and would like to know if $str = preg_replace(\'/[^\\00-\\255]+/u\', \'\', $str); is sufficient for my scenario.[详细]
2023-04-09 05:33 分类:问答PHP Getting certain parts of a string
I have the following tire sizes in my database, all formatted in different ways.Here are a few examples:[详细]
2023-04-08 22:12 分类:问答Using regex to insert a space in a string in php
I have a string that is not properly formed and am attempting to correct it. An example of the string is: -[详细]
2023-04-08 17:37 分类:问答Regex for multiple email address replacements
OK so here is my situation. I have a site that is run by WordPress. I need to ensure email obfuscation and as such have installed a plugin called \'Graceful Email Obfuscation\'. This works great a开发[详细]
2023-04-08 17:04 分类:问答regex (preg_match_all)
I can match this string {string} by using this regex : /{(.*)}/s in PHP\'s preg_replace_callback function.[详细]
2023-04-07 15:55 分类:问答PHP: Replace specified tag values in PHP [duplicate]
This question already has answers here: Grabbing the href attribute of an A element (10 answers) Closed 9 years ago.[详细]
2023-04-07 15:44 分类:问答preg_replace doubt
What I\'m doing wrong ? echo preg_开发者_Go百科replace(\'#\\d{3}\\d{3}\\d{3}\\d{2}#\', \'$1.$2.$3-$4\', \'12345678901\');[详细]
2023-04-07 10:52 分类:问答Problem using regex to remove number formatting in PHP
I\'m having this issue with a regular express开发者_如何学Cion in PHP that I can\'t seem to crack. I\'ve spent hours searching to find out how to get it to work, but nothing seems to have the desired[详细]
2023-04-07 02:47 分类:问答