( !($f = fopen('test.txt', 'w')) ) {
die("Cannot write file");
}
else {
fwrite($f, $html);
fclose($f);
}
return 1;
}
?
-Original Message-
From: n e t b r a i n [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 17, 2001 12:49
To: [EMAIL PROTECTED]
Subject:
On Sunday 18 February 2001 19:54, n e t b r a i n wrote:
function change_sess($html_code){
if(eregi("flag=[0-9]{9}PHPSESSID=[[:alnum:]]{32}",$html_code)){
str_replace("flag=[0-9]{9}PHPSESSID=[[:alnum:]]{32}","?=append_ur
l() ;?", $html_code);
str_replace doesn't know about regular
Hi Christian,
$html_code = eregi_replace (..., $html_code);
arghhh ... I'm so stupid !! Yes, u're right ...
really, many thanks
max
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the
Hi all,
I'm trying to match a particular piece of string in a big string using a
regex in order to change it whith another value ... I mean:
eg:
$html="a
href=link.htm?flag=982420537PHPSESSID=2c86b460d360b13c3ef08b8a46b9cafcLnk
/a";
function change_sess($html_code){
On Saturday 17 February 2001 21:49, n e t b r a i n wrote:
function change_sess($html_code){
if(eregi("flag=[0-9]{9}PHPSESSID=[[:alnum:]]{32}",$html_code)){
str_replace("flag=[0-9]{9}PHPSESSID=[[:alnum:]]{32}","?=append_url()
;?", $html_code);
str_replace doesn't know about regular
is there a way I can make a regex to add a comma
to the beginning of every line of a comma delimited
file ?
Jerry Lake- [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com
--
PHP General Mailing List
r
PHPBeginner.com (Where PHP Begins)
[EMAIL PROTECTED]
www.phpbeginner.com
-Original Message-
From: Jesse Swensen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 4:39 AM
To: PHPBeginner.com
Subject: Re: [PHP] Regex help needed...
Thank you for your suggest, but I don't
This should be a quick one, but I can't seem to wrap my brain around it.
All I need to do is replace leading or trailing spaces with underscores. If
there is spaces in between words, leave them alone.
Suggestions?
--
Jesse Swensen
[EMAIL PROTECTED]
--
PHP General Mailing List
On Mon, Feb 12, 2001 at 12:15:04PM -0500, Jesse Swensen wrote:
This should be a quick one, but I can't seem to wrap my brain around it.
All I need to do is replace leading or trailing spaces with underscores. If
there is spaces in between words, leave them alone.
$fix = ereg_replace("(^ )|(
PROTECTED]
Subject: [PHP] Regex help needed...
This should be a quick one, but I can't seem to wrap my brain around it.
All I need to do is replace leading or trailing spaces with underscores. If
there is spaces in between words, leave them alone.
Suggestions?
--
Jesse Swensen
[EMAIL PROTECTED
on 2/12/01 1:01 PM, Jason Stechschulte at [EMAIL PROTECTED] wrote:
On Mon, Feb 12, 2001 at 12:15:04PM -0500, Jesse Swensen wrote:
This should be a quick one, but I can't seem to wrap my brain around it.
All I need to do is replace leading or trailing spaces with underscores. If
there is
This is very close. If the string, " Testing ", had multiple spaces, but
I wanted to convert each space to a "_", then what? I tried:
There may be a better way, but here is a lengthy one that works.
$checkme = " this is it ";
if(ereg("^( )+", $checkme,
on 2/12/01 4:30 PM, Christian Reiniger at [EMAIL PROTECTED] wrote:
On Monday 12 February 2001 21:08, Jesse Swensen wrote:
This should be a quick one, but I can't seem to wrap my brain around
it. All I need to do is replace leading or trailing spaces with
underscores. If there is spaces in
Hello everyone,
I have a string like
$thestring = "\"Hello everyone\" bye";
What I want to extract is: Hello everyone. Instead I get: bye.
I use this command
ereg("([^\"\"]*)$",$thestring,$regs)
and echo $regs[1].
How can I extract what's within double quotes?
TIA
Regards
--
PHP
On Sunday 11 February 2001 17:21, akio wrote:
$thestring = "\"Hello everyone\" bye";
What I want to extract is: Hello everyone. Instead I get: bye.
I use this command
ereg("([^\"\"]*)$",$thestring,$regs)
and echo $regs[1].
How can I extract what's within double quotes?
Hmm, I only
in Perl, i do thusly:
$adtext = "This is a {test} john.smith\@mail.mainetoday.com";
$email = $1 if($adtext=~/(\{.*\})/);
print "email = $email\n\n";
and i get back "email = "test".
i then do thusly in PHP:
$f=fopen($test_name, "r");
Either I missed the answer on the mailing list, or it was accidentally
skipped, so I'll re-ask...
I have a bit of text ( a TEXT field in mySQL ) and there may or may not be
URLs in this text. (These URLs are defined as anything starting with
http://, mailto:, or www.). Some of these URLs
I have some text that may or may not contain valid URLs (anything starting
with an http:// or a mailto:). Some of these URLs may or may not be
contained within a valid A HREF tag. Could somebody help me out with a
regex that would find all the URLs that are not already contained in an A
HREF
I have some text that may or may not contain valid URLs (anything starting
with an http:// or a mailto:). Some of these URLs may or may not be
contained within a valid A HREF tag. Could somebody help me out with a
regex that would find all the URLs that are not already contained in an A
HREF
In article 059301c08981$7859a020$[EMAIL PROTECTED], "Remco
Chang" [EMAIL PROTECTED] wrote:
You need to find the ASCII codes for these characters and
include them in the range of acceptable chars in the ereg.
something like:
[\xc0-\xff]
where this represents a range of ASCII codes in octal
hi,
just a quick question... i can't seem to have ereg() work with non-ascii
characters such as the character ''.
is this something that i can work around?
remco chang
www.bountyquest.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Howdy,
I need to divide several attributes of a tag.
div key1=val1 key2 = val2 key3='val3' key4 = "val4"
how can I do this without too many time lost?
Is it possible to do this with a regular expression?
Thomas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
ho $match_result."BR";
}
?
Robert W. Collins
Web Developer II
Insight / TC Computers
www.insight.com
www.tccomputers.com
-Original Message-
From: Thomas Angst [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 15, 2001 5:47 AM
To: [EMAIL PROTECTED]
Subject: [PHP] REGEX for tag attribut
Hi!
Can someone help me out with a regex to validate a phone number?
Thanks
Vikram
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
At 17:55 15/01/01 +0500, Vikram Vaswani wrote:
Hi!
Can someone help me out with a regex to validate a phone number?
We'd need to know what format of telephone numbers you're looking to
validate, first.
Angus.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
Hi!
Can someone help me out with a regex to validate a phone number?
Read the examples at:
http://www.php.net/manual/en/function.ereg-replace.php
Der Heiko
Buchtipp: http://www.aufbruch.com/
Heiko und Gisela Spallek:
Aufbruch ins Land der unbegrenzten Moeglichkeiten.
Studieren, Arbeiten und
anges are afoot!
_alex
--
Alex Black, Head Monkey
[EMAIL PROTECTED]
The Turing Studio, Inc.
http://www.turingstudio.com
vox+510.666.0074
fax+510.666.0093
Saul Zaentz Film Center
2600 Tenth St Suite 433
Berkeley, CA 94710-2522
From: [EMAIL PROTECTED] (Vikram Vaswani)
Newsgroups: php.gen
Hey people!
What is wrong with this code?
$buffer = split("([0-9] --)",$pagedata);
$x = count ($buffer);
echo $x;
for ($i=0;$i$x;$i++) {
ereg("([0-9] --)", $buffer[$i], $text);
ereg_replace (" --","", $text[1]);
echo $text[1];
}
Since $pagedata has 8 appearences of the REGEX I am
yes
At 23:54 12.1. 2001, Jerry Lake wrote the following:
--
is it possible with regex to
change one or more text characters
followed by a space into the same
characters followed by a tab?
Jerry Lake
--
PHP General Mailing List
At 02:54 PM 1/12/01 , Jerry Lake wrote:
is it possible with regex to
change one or more text characters
followed by a space into the same
characters followed by a tab?
Jerry Lake
For example -
$NewString = ereg_replace("([[:alpha:]]+) ", "\\1".chr(9), $String);
This will convert a
3500 records and I'd hate to have to do it by hand
any ideas?
Jerry Lake- [EMAIL PROTECTED]
-Original Message-
From: Cynic [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 3:25 PM
To: Jerry Lake; [EMAIL PROTECTED]
Subject: RE: [PHP] regex
depends. is the set of strings
dds the comma after
every word that is followed by one space and not just the first occurance
Jerry Lake
-Original Message-
From: Cynic [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 3:41 PM
To: Jerry Lake; [EMAIL PROTECTED]
Subject: RE: [PHP] regex
looks like you need to find all t
an extent, except that it adds the comma after
every word that is followed by one space and not just the first occurance
Jerry Lake
-Original Message-
From: Cynic [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 12, 2001 3:41 PM
To: Jerry Lake; [EMAIL PROTECTED]
Subject: RE: [PHP]
701 - 733 of 733 matches
Mail list logo