preg-match-all
Regular expression to check for two characters
I want to check if the value is \'H\' or \'T\' or else it can be \'H\' orelse it can be \'T\' or both \'H\' and \'T\'[详细]
2023-04-12 22:58 分类:问答Why does the regex pattern not match the code?
Do you have any idea why this regex does not match the code below? $regex = \"!<title>(.*?)</title>!i\";[详细]
2023-04-12 20:30 分类:问答php with preg_match_all() generates no results
I\'m trying to use this php script in order to locate a stock quote from yahoo finance. The problem I\'m having is that when the script is run it generates no results. This leads me to believe that my[详细]
2023-04-11 11:07 分类:问答Regular expression to detect line that starts with an asterisk
The code below fails to detect a single instance of the occurance. =O Whats wrong? =\\ How do I detect the following lines (which begin with a newline) that begin with an asterisk ? I\'m at a loss. T[详细]
2023-04-08 22:27 分类:问答how to fetch all the links starting with http://plus
I have a pregmatch with the following search : $regexp = \"&l开发者_运维技巧t;a\\s[^>]*href=(\\\"??)([^\\\" >]*?)\\\\1[^>]*>(.*)<\\/a>\";[详细]
2023-04-06 20:22 分类:问答youtube regex swallows remaining text
I\'m doing preg_match_all and str_replace on a block of text to grab YouTube-urls and replace them with the correct embed code.[详细]
2023-04-06 12:48 分类:问答Getting the first image in string with php
I\'m trying to get the first image from each of my posts. This code below works great if I only have one image. But if I have more then one it gives me an image but not always the first.[详细]
2023-04-06 05:12 分类:问答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 分类:问答PHP, Error preg_match_all error unknown modifier?
I\'m getting the following error [13-Sep-2011 07:26:28] PHP Warning:preg_match_all() [<a href=\'function.preg-match-all\'>function.preg-match-all</a>]: Unknown[详细]
2023-04-05 10:34 分类:问答regex match between 2 strings
For example I have the text a1aabca2aa3adefa4a I want to extract 2 and 3 with a regex between abc and def, so 1 and 4 should be not included in the result.[详细]
2023-04-04 07:50 分类:问答