preg-match-all
preg_match_all and preg_replace in Ruby
I am transitioning from php to ruby and I am trying to figure the cognate of the php commands pr开发者_Python百科eg_match_all and preg_replace in ruby.[详细]
2023-03-01 00:13 分类:问答PHP Regex Expression Involving Japanese
My goal is to filter through a Microsoft Word Document (.docx) grabbing all Japanese kanji and kana. The current code I am working with is the following:[详细]
2023-02-28 18:07 分类:问答Get number from a string
I have a string for example \"lorem 110 ipusm\" and I want to get the 110 I already tried this: preg_match_all(\"/[0-9]/\", $string, $ret);[详细]
2023-02-28 04:32 分类:问答Regular expression to match block of HTML
First I\'ll show you a sample of the code I\'m working with: <div class=\"entry\"> <p>Any HTML content could go here!</p>[详细]
2023-02-27 00:38 分类:问答PHP preg_match_all matches 74 out of 100 matches
I\'m working on a project which involves scraping from the major search engines (to be more specific - checking page rank and finding similar pages). With curl I\'m calling the search engine, then wit[详细]
2023-02-26 22:58 分类:问答preg_match_all syntax problem
Having trouble with preg_match syn开发者_JAVA百科tax with in a page I need to find anything like $first = \'/>http:\\/\\/www.(.*?)\\/(.*?)\\</\';[详细]
2023-02-24 10:49 分类:问答Break up a string by words an punctionation
To split up a string,开发者_如何转开发 I come up with... <php preg_match_all(\'/(\\w)|(,.!?;)/\', \"I\'m a little teapot, short and stout.\", $matches);[详细]
2023-02-23 09:16 分类:问答php find all elements with style attribute using preg_match_all
I just want to find ALL elements with preg_match_all in a html document. After reading the file i am using the following:[详细]
2023-02-23 04:38 分类:问答using preg_match_all for nested brackets
I have a string like this: This is a {{text}} for {{testing}} PHP {{regular expression}} I use the following pattern to get an array containing {{text}} , {{testing}} , {{regular expression}}[详细]
2023-02-22 06:29 分类:问答Image tag scraper regular expression
I\'m really REALLY bad at regular expressions. It just hasn\'t clicked yet. I\'m trying to make small application that extracts all image tags of their src, width, and height attributes. This is what[详细]
2023-02-22 03:23 分类:问答