|
|
Browse by Tags
All Tags » PHP
Showing page 1 of 12 (117 total posts)
-
I'm writing some data miners that extract data from tables on financial websites, and I've hit a brick wall.
One of the data sets I need to get is a fairly large table, however when i use the following I get nothing back:
preg_match_all('|<table.*?>(.*?)(\s*?)</table>|',$page,$matches);
Looking at the ...
-
Hi regex experts,
I’m searching for a regular expression for PHP’s preg_replace() in order to adjust concatenated strings (no multi-line).
These strings are fragments in German which form a sentence and therefore need to be (automatically) edited to adhere to grammar conventions.
Roughly speaking, the regular expression should ...
-
Howdy,
I would like to implement a regex of the rules found here for showing a word in its syllables http://www.phonicsontheweb.com/syllables.php
So far, I've got:
//lowercases the word, taking out anything other than letters
$word = preg_replace('/[^a-z]/is', '', strtolower($word));
//split at: vowels, double ...
-
what i'm trying to do is remove all line breaks in and around certain html (or xml if you will) elements (h[0-9], ul, li) from a string
the following works fine for removing leading and trailing line breaks, but not the ones inside the element:
$text = ...
-
hi
I have a string like this:
Code:
$ maCahine = (1 and 2 or 3)
I have a php regexp:
Code:
$ reg = "# (\ () (0,1) \ s * $ number \ s * (and | or | \)) # i
to replace the number by string has provided the number preceded by "(" and follow either by AND or OR or ").
then I use php preg_replace function to replace.
but I ...
-
Hello,
We tried to figure that out, but we could not find a solution yet. So please give us some kind of advice.
These are the essential lines:
RewriteRule ([a-zA-Z0-9]+)/([a-zA-Z0-9]+)\.html$ index.php?tp=$1&up=$2 [L]
RewriteRule ([a-zA-Z0-9]+)/$ index.php?tp=$1 [L]
RewriteRule ([a-zA-Z0-9]+)$ index.php?tp=$1 [L] ...
-
Hello everyone,
I'm pretty new to regexes and I've got a small problem. I have the following regex: (?<=lblVacant">(ab )?)([\d,.\/]+)(?=(<\/span>|\s\-)) which should match ose1_DetailEstateData1_lblVacant">06.08.2009 - 30.10.2009</span></td>
ailEstateData1_lblVacant">10.08.2009 - ...
-
I am working on making a bbcode system with php using preg_replace(), and I am making it so that other tags will not work inside of a code block. This is the code I am currently using, it almost works:
/(?!\[code\])(.*)(\[b\])(.+)(\[\/b\])(.*)(?<!\[\/code\])/Usi
what I want it to do is if [*code] and [*/code] are around the text inside, ...
-
I need help with a regular expression in PHP, I have made a small forum, and I am adding features, up until now whenever someone types a url "http://..........." I use a regex to make a link, but now I have new features, one of them is adding youtube videos, to do this I ask my members to simply type youtube(youtube_url)
the problem is ...
-
I'm trying to find words in HTML that are between tags using PHP (v5.2.6) preg_replace.
The following rules apply to the matches
full word match only (can also be matched when adjacent to non-word characters such as commas, parenthesis, periods, question marks, exclamation marks, percentage, dollar signs)
e.g. "test" would ...
1 ...
|
|
|