preg-match

    2热度

    3回答

    单词preg_match我需要在PHP中匹配希伯来语中的完整单词的函数。 请帮忙。

    1热度

    2回答

    我试图找到正确的正则表达式转换eregi($1,$2)到preg_match("/$1/i",$2) 我需要考虑是否有将在其与功能(),并且它们可能会出现多一次。 任何人都可以提供适当的正则表达式来做到这一点吗? 谢谢

    1热度

    2回答

    我想用下面的代码实现的事情:在文本中匹配指定的单词不区分大小写且只有一次,并将其替换为链接。 我有以下的preg_match的字“富”在一个字符串匹配: if (preg_match("/\bfoo\b/i", $text, $results, PREG_OFFSET_CAPTURE)) { // substr_replace the word 'foo' for a link <a h

    2热度

    4回答

    我想出了如何检查OR病例,preg_match("/(word1|word2|word3)/i", $string);。我无法弄清楚的是如何匹配AND情况。我想检查该字符串是否包含所有术语(不区分大小写)。

    3热度

    1回答

    我有以下代码。 function rgb2hex(rgb) { rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]); } 似乎在FF和Chrome中可以正常工作。 IE出现'1'为空或不是对象。 rgb值似乎确实让它到了rgb.m

    0热度

    4回答

    我想我怎样才能使这个与正则表达式,PHP和预浸匹配解析从 <td>content</td> and <td *?*>content</td> and <td *specific td class*>content</td> 内容?

    0热度

    4回答

    我使用PHP。 我正在努力将所有CSS文件自动放到一起。我自动加载CSS文件,然后将它们保存到一个较大的文件上传。 在我的本地安装中,我有一些需要删除的@import行。 它看起来像这样: @import url('css/reset.css'); @import url('css/grid.css'); @import url('css/default.css'); @import url

    2热度

    4回答

    只需要查看段落是否包含“停用词”,停用词在下面的数组中。 我有公式为: $pattern_array = array("preheat", "minutes", "stir", "heat", "put", "beat", "bowl", "pan"); foreach ($pattern_array as $pattern) { if (preg_match('/'.$p

    0热度

    3回答

    我有一个文本文件,上面写着: 9123 Bellvue Court 5931 Walnut Creek rd. Andrew Bailey Chris Drew Earl Fred Gerald Henry Ida Jake Koman Larry Manny Nomar Omar Perry Quest Raphael State Telleman U

    0热度

    2回答

    text text text text text text {test} content content content {/test} text text text text text text 我需要从上面的字符串两个不同的结果: 1. {test} content content content {/test}