pcre
regex int + comma
i need a regex for: 123,456,789,123,4444,... basically comma separated values. The INT part can be 1-4 numbers long, followed by a comma...always in this form...[详细]
2023-01-11 02:43 分类:问答A preg_replace puzzle: replacing zero or more of a char at the end of the subject
Say $d is a directory path and I want to ensure that it starts and ends with exactly one slash (/). It may initially have zero, one or more leading and/or trailing slashes.[详细]
2023-01-10 05:20 分类:问答Perl regexp /(\r\n|\r|\n)/
I want to know how this ambiguous pattern is solved in perl(more generally everything that use libpcre):[详细]
2023-01-09 10:24 分类:问答Converting PCRE recursive regex pattern to .NET balancing groups definition
PCRE has a feature called recursive pattern, which can be used to match nested subgroups. For example, consider the "grammar"[详细]
2023-01-09 08:19 分类:问答How can i count the number of words between two words?
How can i count the number of words between two words? $txt = \"tükörfúrógép banana orange lime, tükörfúrógép cherry árvíztűrő orange lyon[详细]
2023-01-08 09:10 分类:问答Problem with ereg deprecated
Can some please help me to rewrite these code: if (eregi($asked,$accepted)) { $this->plot_type = $which_pt;[详细]
2023-01-07 06:26 分类:问答Regex fails to match for no obvious reason
Consider the two following regular expression snippets and dummy HTML that it should be matching: Apparently, I can only post one link until I get more reputation, so the link below contains the thre[详细]
2023-01-06 02:29 分类:问答string manipulation preg_replace or str_replace
I need to replace a word with another word. But $var= str_replace($linklabel[$k], $linklabelmod[$k], $var);[详细]
2023-01-05 13:54 分类:问答PHP: Trouble with preg_match_all() return
I\'m writing this quick script to extract chatroom names from the source of a webpage. I\'m grabbing the data with fopen() and fgets() and that all returns fine.[详细]
2023-01-05 10:16 分类:问答Regular expression for matching a variety of types of numbered lists
I\'d like to create a (PCRE) regular expression to match all commonly used numbered lists, and I\'d like to share my thoughts and gather input on way to do this.[详细]
2023-01-05 08:29 分类:问答