|
|
Browse by Tags
All Tags » php
Showing page 1 of 13 (128 total posts)
-
Hello
I have a forum that allows custom bulletin board code to be executed through PHP files. Now I'm trying to construct a html table tag from some kind of 'template'. A pipe symbol designates the delimiter between individual cells of the table and a linebreak designates that a new table row should be inserted. Ofcourse, there is no ...
-
Hi, im trying to mask all html "a" tags in php using preg_replace_callback what contains a valid email address in href attribute, "mailto:" would be optional. a-tags can have any possible syntax, so im trying to match all [ \t\r\n\v] and chars between <a........href and after @dd.ee".........>, i assume i have ...
-
Hi there,
I like to have a named capture regular expression who captures the following from a html string:
some_tag, could by p div span, (?P<container_start>.....
the total class attribute cont_p_img_left, right or center and not other classes, (?P<container_class>.....
the last part of the class attribute, ...
-
Hi!
I am working in PHP and came up with this:
$this->addKeyword(
preg_replace('/(.*?)[Cc]-? ?[Ss]harp(.*)/i', '$1C#$2', $wgTitle) );
It is intended to catch "csharp", "c sharp", and "c-sharp" regardless of case and replace it with ...
-
Hi y'all!
I'm very glad this forum exists as I'm not sure where else to turn with this question. I'm parsing the file name of a whole bunch of files in PHP using preg_match_all() and I want to recover 4 bits of information. The naming convention is:
_tag_99_Nice_name.extension
I need to break this down into 4 parts_tag_ : I ...
-
Okay I have spent two days on a mental block in PHP using the stristr() command.
Here's the deal.
A simple text file loaded in as a string where the following needs to be found in the string:
beginning of line, three periods a space, some word or two words, a space and three periods
EXAMPLES: ... WORD ONE ...
-
I have this kind of strings:
{test1|test2|test3}
This is easy to match with something like:
~{(.*?)}~
But I would like to be able to match strings like:
{test1|test2|test3{subtest1|subtest2}}
or
{test1|test2|test3{subtest1|subtest2{subsubtest1|subsubtest2|subsubtest3}}}
I can't figure out how I could match that in the ...
-
I need a regular expression to get the Event, Name, School, Final Swim Time, and Swim Threshold (The DIIA) from a Results page like the one at ( http://www.gliac.org/sports/mswimdive/2010-11/stats/Results_Wed_Finals.htm ). Note that the results are sepereated from the rest of the page by the "<pre>" html tag.
Each "line" ...
-
Using PHP.
Here is a few examples of strings that I am working with: part=1 total=1 line=128 size=2799 name=name.of.file.12-group.nfo
part=2 total=3 line=128 size=2124 name=different name of file.rarBasically I need to match the field name (part, total, size, name, but there can be any combination of these and possibly others as well) ...
-
I am using the Shorten URL in a text using Bit.ly PHP class by Muhammad Arfeen and I would like to replace his code with Philippe Leybaert's code. The original PHP code is below:
preg_match_all(’(((f|ht){1}(tp://|tps://))[-a-zA-Z0-9@:%_+.~#?&//=]+)’, $text, $hyperlinksArray);
Here is the same code with Philippe ...
1 ...
|
|
|