|
|
Browse by Tags
All Tags » php regex
-
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 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 - ...
-
Hi,
I'm using PHP preg_replace function.
I need to replace a word inside a text string, that DO NOT match these patterns :
<.*".* word.*".*>
<h[1-6].*>.*word.*</h[1-6].*>
The goal is to replace all occurences of a word inside the html code, on the condition that it's not part of a title ...
-
Hi there,
I have a string which is the file_get_contents of a cpanel database creation, user creation etc and I want to strip the extra junk off and just have the relevant data.
Using PHP 5.0.5 on Linux
I have tried numerous things but I can't figure it out. I am not very good with regex yet. I don't even really know ...
-
Hi,
I'm using PHP to parse an incoming email. I wish to be able to match then store URL's contained in the email message.
I just need to figure out the RegEx to match URL's. I've been currently building and testing ...
-
Hello RegexAdvice users.
I am at this time trying to update my template system, and i have desidet to use regex insted of ALOT of explodes :D
I this i will start out with showing you what my templates look like.
code:<html>
<head>
<title>Some test</title>
</head>
<body>
<php:if ...
-
Hi, I asking for help in my PHP code optimization. I try to rewrite my old/slow BBCode conversion function to use regex. The allowed BBCodes are
[ b]text[ /b]
[ i]text[ /i]
[ url]domain.com[ /url] or [ url]domain.com|domainname[ /url]
[ img]filename.ext[ /img] or [ img]filename.ext|description[ /img]
It is possible to construct ...
-
Hi,
Anybody out there, I'd be immensly greatful if you helped me fix one regular expressions of mine.
Basically I've written a regular expression in PHP identifying a pattern of a certain type of URL
REGEX: /(http\:\/\/dx\.doi\.org\/.*?)(\s|$|;|>)/
it will catch strings of URLs from the 'http://dx.doi.org/' domain, looking ...
-
Hi there,
I tried finding the information first on regexlib.com but didn't find my exact answer.
In php I'm trying to make the http:// part of links visible in a html document, and I got something that works *almost* every time, but sometimes it gives bad results. I was wondering if someone here could help me out? Thanks in ...
|
|
|