preg-match
Regex for number surrounded by slashes
Like the title says, I have a (faulty) Regex in Jav开发者_JAVA百科aScript, that should check for a \"2\" character (in this case) surrounded by slashes. So if the URL was http://localhost/page/2/ the[详细]
2023-04-08 18:43 分类:问答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 分类:问答preg_match question, how to do this?
Say I have the following: $var = \"127.0.0.1 (127.0.0.1) 56(84) b开发者_高级运维ytes of data. 64 bytes from 127.0.0.1: icmp_seq=1 ttl=57 time=19.5 ms --- 127.0.0.1 ping statistics --- 1 packets trans[详细]
2023-04-08 14:48 分类:问答php regular expression matches and replacement
again. I\'m trying to go through a database table and replace all instances of old BBCode (ie: [i:fs8d979]) and replace it with simple BBCode ([i]). However, I\'m getting very confusing results.[详细]
2023-04-07 02:00 分类:问答PHP regexp: matching everything until a word appears
In PHP I\'m looking to match everything until a certain word appears: $text = \"String1 . testtesthephepString2 Here\";[详细]
2023-04-06 10:24 分类:问答Regex using PHP, any non-zero number containing the digits 0-9
I have this regex: /^[0-9]+$/i Used in this code: preg_match(\'/^[0-9]+$/i\', $var); I want the following to be true:[详细]
2023-04-06 06:24 分类:问答What's wrong with this preg_match_all
I\'m using file_get_contents to read a .html file that has a ta开发者_运维技巧ble. <table id=\"someTable\" style=\"width:100%;margin-bottom:0;\">[详细]
2023-04-05 14:57 分类:问答Preg_match with regular expressions?
Im trying to catch a posted variable with name that begins with \'price\' and ends开发者_StackOverflow with a number 0-9 and save the number in a variable $matches. For some reason, the code i have is[详细]
2023-04-05 12:27 分类:问答What is the preg_match_all `u` flag dependent on?
I have some code in a PHP application that is returning null when I try and use it on the production server, but it works fine on the development server. Here is the line of code:[详细]
2023-04-05 08:54 分类:问答Check if variable contains text or numbers
Im creating a search function. The users are only allowed to use a-z A-Z and 0-9. How do i check if $var 开发者_StackOverflow社区only contains text or numbers, and not special characters ?[详细]
2023-04-05 03:02 分类:问答