|
|
Browse by Tags
All Tags » tags
-
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, ...
-
Hello,
I'm looking for a pattern that extracts the attributes inside an html element string
I came up with the following:
/<font\s[^>]*face="(.*?)" size="(.*?)" color="(.*?)"[^>]*>(.*?)<\/font>/si
but what if not all 3 attributes face, font and size are required?
is it possible to ...
-
I want to change a font element to an XHTML compatible variant.
e.g.
find
<font face="arial" size="1"
color="red" >hello world</font>
replace
<span
style='font-family: arial; font-size: 1; color: red;'>hello
world</span>
note:
- the font attributes can change order
- ...
-
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, ...
-
my variable is like this:$var='<td><span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style='direction: ltr; text-align: left'><span style='font-weight: bold; font-style: italic;'><span style='text-decoration: ...
-
Second day trying to resolve the problem.I need to find text between second tags "value". It could be different. The text between first tags "value" is constant. There is possible to use only regular expressions. No any programm tecknics.
I can find text 'first' and 'second'. But only 'second' - I cant. ...
-
Hi, i got a dillema... for a company i need to make every occurence of it's company name to be in red and bold font.
i have writen a simple function that i can call and filter all text database records
Function companyName(inputText)
If inputText<>"" Then
companyName= ...
-
hi all,
i need some regex to get over this situation.
i couldnt figure it out myself so if you can help me, that would be great.
my problem is that i need to extract some tags. for example;
bla bla bla {{ tag starts here {{ internal tag }} and it continues.. }} like this..
I need to extract :
{{ tag starts here {{ internal tag }} and it ...
-
Hi,
I'm using a PHP script to convert certain strings (for example "ski holiday") to links. The problem is that the strings are also converted if they appear in subheaders (<H2>, example). I only want them converted if they appear in normal text (<P>).
The script I use (SH Autolink for WordPress) contain the regular ...
|
|
|