Re: [PHP] RegEx question

2002-07-02 Thread Gurhan Ozen
eregi(php$, $stringtobecompared); See: http://www.php.net/manual/en/ref.regex.php Gurhan - Original Message - From: David Busby [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Tuesday, July 02, 2002 4:49 PM Subject: [PHP] RegEx question List, How can I regex to compare

[PHP] regex

2002-06-11 Thread Gerard Samuel
Im expecting a string like foo.png. Im trying to replace 'foo' with another value that I have. Im trying this - $file = preg_replace('/([a-z][0-9]-_*)(.[a-z]{3,4})/i', $new_file . $2, $_FILES['upload']['name']); The second regex group works ok, its the first one I cannot figure out. It is

Re: [PHP] regex

2002-06-11 Thread Gerard Samuel
Well Ive gotten (.*) and ([a-z]*[0-9]*_*-*) to work thus far as the first group. I would like to avoid option 1, and option 2 doesn't seem right Gerard Samuel wrote: Im expecting a string like foo.png. Im trying to replace 'foo' with another value that I have. Im trying this - $file

Re: [PHP] regex

2002-06-11 Thread Jim lucas
$file = preg_replace('/^([a-z0-9\-\_]*).([a-z]{3,4})$/i', $new_file . .$2, $_FILES['upload']['name']); Maybe this? Jim Lucas - Original Message - From: Gerard Samuel [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Tuesday, June 11, 2002 3:11 PM Subject: [PHP] regex Im expecting

[PHP] RegEx problems...

2002-06-03 Thread Jas
This is baffling me, I have a form on one page that opens a php file in a text area for editing. In order to view the contents of the file in the text area I had to setup a eregi_replace(,a) string. When I save the changes back to the text file I setup a reverse string i.e. [ eregi_replace(a,)

Re: [PHP] RegEx problems...

2002-06-03 Thread Analysis Solutions
On Mon, Jun 03, 2002 at 11:15:15AM -0600, Jas wrote: In order to view the contents of the file in the text area I had to setup a eregi_replace(,a) string. 's are not legal in HTML. You need to escape them. When pulling stuff out of the file, use htmlspecialchars() before displaying the

RE: [PHP] Regex Assistance

2002-05-28 Thread Scott Hurring
:[EMAIL PROTECTED]] Sent: Monday, May 27, 2002 10:00 PM To: [EMAIL PROTECTED] Subject: [PHP] Regex Assistance Hey All, I am just begining to learn regex functions in PHP. Anyhow I am trying to code a preg_replace function which basically cleans a URL. What I mean is say a url

[PHP] Regex Assistance

2002-05-27 Thread Scott Reismanis
Hey All, I am just begining to learn regex functions in PHP. Anyhow I am trying to code a preg_replace function which basically cleans a URL. What I mean is say a url is index.php?page=hellolist=10start=4 you pass that URL and say 'list' to the function (shown below) Anyhow I want that to

RE: [PHP] Regex Assistance

2002-05-27 Thread Martin Towell
this is what I use to get rid of line from the url $qs = ereg_replace($, , ereg_replace(line=[^]*?, , $QUERY_STRING)); HTH MArtin -Original Message- From: Scott Reismanis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 12:00 PM To: [EMAIL PROTECTED] Subject: [PHP] Regex

[PHP] regex help

2002-05-26 Thread Jeff Field
This is not really specific to PHP (although the information might be useful for all that form validation we all do), and for that I apologize in advance (does anyone know of a regex mailing list?), but maybe someone here can help with the following: I find no good regex for checking valid

Re: [PHP] regex help

2002-05-26 Thread Miguel Cruz
I use this, but it's a preg rather than ereg pattern: '/([a-z0-9]+[a-z0-9\-]*\.)+[a-z0-9]+[a-z0-9\-]*[a-z0-9]+$/i' Two problems (which in practice are so slight that I've foregone my usual standards-analness to ignore them) 1) It will allow a domain name component (except the final one)

[PHP] regex: string begins with NEITER http NOR cid NOR mailto

2002-05-19 Thread kras
Hello! I have got a big problem: I have html content in $html variable, which contains href, src and background tags. Those tags may contain relative adressess and absolute addressess which begin with http(s): or cid: (mail inline attachements) and mailto: I have also variable

RE: [PHP] regex: string begins with NEITER http NOR cid NOR mailto

2002-05-19 Thread Ray Hunter
Show some code... Thanks, Ray BigDog Hunter -Original Message- From: kras [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 19, 2002 9:53 AM To: [EMAIL PROTECTED] Subject: [PHP] regex: string begins with NEITER http NOR cid NOR mailto Hello! I have got a big problem: I have html

Re: [PHP] regex: string begins with NEITER http NOR cid NOR mailto

2002-05-19 Thread kras
BigDog Hunter -Original Message- From: kras [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 19, 2002 9:53 AM To: [EMAIL PROTECTED] Subject: [PHP] regex: string begins with NEITER http NOR cid NOR mailto Hello! I have got a big problem: I have html content in $html variable, which

[PHP] regex (preg_replace)

2002-05-18 Thread Gerard Samuel
Im trying to get a final output to be 'item' but Im unable to get working. Could someone point me where Im going wrong. Thanks ?php $a = 'item rdf:about=http://www.trini0.org;'; $b = preg_replace(/(item)(\s.*)()/i, $1 . $3, $a ); echo $b; ? -- PHP General Mailing List

Re: [PHP] regex (preg_replace)

2002-05-18 Thread Gerard Samuel
I figured it out. Change the last line to echo htmlspecialchars($b); and you'll get the proper output. Gerard Samuel wrote: Im trying to get a final output to be 'item' but Im unable to get working. Could someone point me where Im going wrong. Thanks ?php $a = 'item

[PHP] RegEx and ?

2002-04-24 Thread Boaz Yahav
When i try to use preg_match on strings that have ? inside them it seems to not work. Any ideas how to bypass this? thanks berber

Re: [PHP] RegEx and ?

2002-04-24 Thread Marius Ursache
Boaz Yahav a écrit : When i try to use preg_match on strings that have ? inside them it seems to not work. Any ideas how to bypass this? thanks berber -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \`

Re: [PHP] RegEx and ?

2002-04-24 Thread Marius Ursache
use \? instead of ? Boaz Yahav a écrit : When i try to use preg_match on strings that have ? inside them it seems to not work. Any ideas how to bypass this? thanks berber -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \`

[PHP] Regex

2002-04-22 Thread James Taylor
I'm trying to come up with a regular expression that will match the TL and Second Level domain names in someone's email address ONLY. So, say someone's address is [EMAIL PROTECTED], I need to match ONLY pacbell.net. It shouldn't matter what the address looks like, I'm looking for any number

AW: [PHP] Regex

2002-04-22 Thread Red Wingate
([[-a-zA-Z0-0_]*)\.([a-zA-Z]{2,4}$ should fit ur needs :P -Ursprungliche Nachricht- Von: James Taylor [mailto:[EMAIL PROTECTED]] Gesendet: Montag, 22. April 2002 10:17 PM An: [EMAIL PROTECTED] Betreff: [PHP] Regex I'm trying to come up with a regular expression that will match the TL

RE: [PHP] Regex

2002-04-22 Thread Darren Gamble
-Original Message- From: James Taylor [mailto:[EMAIL PROTECTED]] Sent: Monday, April 22, 2002 2:17 PM To: [EMAIL PROTECTED] Subject: [PHP] Regex I'm trying to come up with a regular expression that will match the TL and Second Level domain names in someone's email address ONLY

Re: [PHP] Regex

2002-04-22 Thread Miguel Cruz
On Mon, 22 Apr 2002, James Taylor wrote: I'm trying to come up with a regular expression that will match the TL and Second Level domain names in someone's email address ONLY. Whatever you're planning on doing with that, I hope you're ready for addresses that end with .ac.uk and so on; trying

Re: AW: [PHP] Regex

2002-04-22 Thread Miguel Cruz
On Mon, 22 Apr 2002, Red Wingate wrote: ([[-a-zA-Z0-0_]*)\.([a-zA-Z]{2,4}$ Underscores are not permitted in domain names... miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Regex: catchall function to validate Last and First names

2002-04-22 Thread Carl E Shmidt
I have a guest book , and I want to make sure that those people who sign the guest book can't impersonate a member of the web site. the code below checks the input string, which is the guestbook signer's name, against a list of defined web site members. Is there any way to circumvent the code

[PHP] Regex Form Filter Help

2002-03-27 Thread James Taylor
I have a site where users can type whatever they want in and it posts it to a database. I'm trying to eliminate whatever types of abuse I can think of, and, since I'm using nl2br on the posts, I'm afraid a user might just hold down enter for a couple of seconds and scroll everything off the

RE: [PHP] Regex Form Filter Help

2002-03-27 Thread Demitrious S. Kelly
- From: James Taylor [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 12:26 PM To: [EMAIL PROTECTED] Subject: [PHP] Regex Form Filter Help I have a site where users can type whatever they want in and it posts it to a database. I'm trying to eliminate whatever types of abuse I can think

[PHP] regex expession problems

2002-03-27 Thread Carl E Shmidt
But hey, who doesn't have em eh? Anyway, here's my predicament. I want to look for either the string http://; or for 1 or more spaces in a string. Here's the regex I've got preg_match(/http:\/\/ | [[:space:]]/i,$valToEval); I can get each test case working individually, but as soon as I

RE: [PHP] regex expession problems

2002-03-27 Thread Martin Towell
? -Original Message- From: Carl E Shmidt [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 11:41 AM To: [EMAIL PROTECTED] Subject: [PHP] regex expession problems But hey, who doesn't have em eh? Anyway, here's my predicament. I want to look for either the string http://; or for 1

[PHP] regex

2002-03-27 Thread Carl E Shmidt
Now I'm looking to find 1 or more digits in an input: preg_match([[:digit:]],$valToEval); I'm passing the value 12 and this thing still returns 0. What's going on? Carl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] regex

2002-03-27 Thread Matt Moreton
preg syntax is different to ereg (which you are using). You also need to provide an output variable. This would work: preg_match( /[0-9]+/, $input, $output ); -- Matt Carl E Shmidt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Now I'm looking to find 1 or

RE: [PHP] regex

2002-03-02 Thread Boaz Yahav
you tomorrow. -Original Message- From: Paul A. Procacci [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 28, 2002 4:31 AM To: [EMAIL PROTECTED] Subject: [PHP] regex Hey all, I'm been programming in php for a while, but I'm stumpt with this one. You know the funny thing? It's

[PHP] regex

2002-02-27 Thread Paul A. Procacci
Hey all, I'm been programming in php for a while, but I'm stumpt with this one You know the funny thing? It's probably really simple Anyway here it is Assume I have this query string: ticket_id=3change_name=statuschange_value=3ticket_id=32=1= And all I want is 2=1= Well, the closest I

Re: [PHP] Regex function needed

2002-02-08 Thread Michael Kimsal
Bas Jobsen wrote: Op donderdag 07 februari 2002 23:58, schreef Michael Kimsal: Looking for a regex (preg or ereg) to remove all 1, 2 and 3 character words. ? $string=over deze regex loop ik nu al de hele dag en een uur te piekeren. 't wil niet! of wel! l'a.; $string= .$string; while

[PHP] Regex function needed

2002-02-07 Thread Michael Kimsal
Looking for a regex (preg or ereg) to remove all 1, 2 and 3 character words. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Regex function needed

2002-02-07 Thread Douglas Maclaine-cross
$string = ereg_replace([A-Za-z']{1,3}, , $string); // don't forget I'm I haven't checked but something like this. -Original Message- From: Michael Kimsal [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 9:59 To: [EMAIL PROTECTED] Subject: [PHP] Regex function needed Looking

Re: [PHP] Regex function needed

2002-02-07 Thread Edward van Bilderbeek - Bean IT
... the reason why it's performed in a while loop is because of two or more short words following each other and thus sharing a space... Greets, Edward - Original Message - From: Michael Kimsal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 11:58 PM Subject: [PHP

Re: [PHP] Regex function needed

2002-02-07 Thread Edward van Bilderbeek - Bean IT
; - Original Message - From: Edward van Bilderbeek - Bean IT [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Michael Kimsal [EMAIL PROTECTED] Sent: Friday, February 08, 2002 12:33 AM Subject: Re: [PHP] Regex function needed I don't know if this is the best way but: $str = This is or was a test

RE: [PHP] Regex function needed

2002-02-07 Thread Martin Towell
]; Michael Kimsal Subject: Re: [PHP] Regex function needed this might even work beter, to take comma's and periods etecetera into account to: $str = This is or was a test for short words, although an, should be deleted to.; while (ereg( [a-z]{1,3} , $str)) { $str = eregi_replace( [a-z']{1,3

Re: [PHP] Regex function needed

2002-02-07 Thread Bas Jobsen
Op donderdag 07 februari 2002 23:58, schreef Michael Kimsal: Looking for a regex (preg or ereg) to remove all 1, 2 and 3 character words. ? $string=over deze regex loop ik nu al de hele dag en een uur te piekeren. 't wil niet! of wel! l'a.; $string= .$string; while

Re: [PHP] Regex function needed

2002-02-07 Thread Edward van Bilderbeek - Bean IT
]; [EMAIL PROTECTED] Sent: Friday, February 08, 2002 1:10 AM Subject: Re: [PHP] Regex function needed Op donderdag 07 februari 2002 23:58, schreef Michael Kimsal: Looking for a regex (preg or ereg) to remove all 1, 2 and 3 character words. ? $string=over deze regex loop ik nu al de hele dag

RE: [PHP] Regex function needed

2002-02-07 Thread Douglas Maclaine-cross
); $str = eregi_replace('([^a-z\' ])[a-z\']{1,3}$', '\1', $str); echo $str; -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 11:09 To: Michael Kimsal; [EMAIL PROTECTED] Subject: Re: [PHP] Regex function needed after some

RE: [PHP] Regex function needed

2002-02-07 Thread Martin Towell
Kimsal; [EMAIL PROTECTED] Subject: RE: [PHP] Regex function needed I don't know about preg but how about this monster? $str = I'm okay now aren't I. Do I work? 'mm; while(eregi(' [a-z\']{1,3} ', $str)) $str = eregi_replace(' [a-z\']{1,3} ', ' ', $str); while(eregi(' [a-z\']{1,3}([^a-z

[PHP] regex

2002-01-25 Thread Yamin Prabudy
Hi I like to ask something say i got this line b = bla.net a = blabla.com (a and b NOT a variable) i want to use php to take the second line and want to grep the blabla.com how can i do that Yamin Prabudy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Regex error

2002-01-21 Thread Bas Jochems
use $rgTemp = split('[|]',$szTag); instead of $rgTemp = split(|,$szTag); on line 2 PHP List wrote: Hi, Can someone please tell me why the this is happening: 1) $szTag = test|3; 2) $rgTemp = split(|,$szTag); 3) $szTag = $rgTemp[0]; 4) $nItemID = $rgTemp[1]; ^line numbers for

[PHP] Regex error

2002-01-18 Thread PHP List
Hi, Can someone please tell me why the this is happening: 1) $szTag = test|3; 2) $rgTemp = split(|,$szTag); 3) $szTag = $rgTemp[0]; 4) $nItemID = $rgTemp[1]; ^line numbers for ref only, not in actual code. Will give me the error: PHP Warning: unexpected regex error(14) in /test.php on

Fwd: Re: [PHP] Regex error

2002-01-18 Thread bvr
split() takes a regular expression, this means you have to escape the | char with a \ like this: $rgTemp = split(\|,$szTag); bvr. On Fri, 18 Jan 2002 14:40:25 -0800, PHP List wrote: Hi, Can someone please tell me why the this is happening: 1) $szTag = test|3; 2) $rgTemp =

[PHP] Regex question

2002-01-09 Thread Jon Haworth
Hi all, I've got a regex that's working fine, apart from one little problem. $tags = array (script, !--!\[CDATA\[, \]\]--); foreach ($tags as $currentTag) if (preg_match (/^\/. $currentTag. /, $content)) // do something (checking to see if anything in the

Re: [PHP] Regex question

2002-01-09 Thread Stefan Rusterholz
Hi all, I've got a regex that's working fine, apart from one little problem. $tags = array (script, !--!\[CDATA\[, \]\]--); A quick shot (perhaps I miss the point ;): if you do $x = \[; then $x will contain [. If you then do a regex with preg_match(/$x/, ...

RE: [PHP] Regex question

2002-01-09 Thread Jon Haworth
If you want the [ to be escaped in the regex you have to double-escape it: $x = \ \[; (sorry, the two \ should be together without a space but my stupid mail-app converts the string thinking it's an network address) so $x will contain \[ as you want ( the first backslash escapes the second).

Re: [PHP] Regex question

2002-01-09 Thread Stefan Rusterholz
If you want the [ to be escaped in the regex you have to double-escape it: $x = \ \[; (sorry, the two \ should be together without a space but my stupid mail-app converts the string thinking it's an network address) so $x will contain \[ as you want ( the first backslash escapes the

RE: [PHP] Regex question

2002-01-09 Thread Jon Haworth
As far as I can see (notice: I'm not a regex-king ;) the regex seems correct to me. The only thing I'm wondering about is the /^ (second last line of the citation). Together with your expression in the array it results in preg_match(/\/!\[CDATA\[/, ...) I'm wondering if that (/![CDATA...) is

Re: [PHP] RegEx gurus help...

2001-12-12 Thread Andrey Hristov
[EMAIL PROTECTED] Sent: Monday, December 10, 2001 4:21 PM Subject: [PHP] RegEx gurus help... I need to replace all relative links in an html doc with absolute links on the fly weather it be an image link, img src='/_imgs/imgs_nav/transPix.gif' width='10' height='13' img src='../_imgs

[PHP] RegEx gurus help...

2001-12-10 Thread Brian V Bonini
I need to replace all relative links in an html doc with absolute links on the fly weather it be an image link, img src='/_imgs/imgs_nav/transPix.gif' width='10' height='13' img src='../_imgs/imgs_nav/transPix.gif' width='10' height='13' a URL, a href=/dealers/index.asp a link to an external JS

RE: [PHP] RegEx gurus help...

2001-12-10 Thread Jack Dempsey
trying to write a regex for all of that -Original Message- From: Brian V Bonini [mailto:[EMAIL PROTECTED]] Sent: Monday, December 10, 2001 9:22 AM To: PHP Lists Subject: [PHP] RegEx gurus help... I need to replace all relative links in an html doc with absolute links on the fly

RE: [PHP] RegEx gurus help...

2001-12-10 Thread Brian V Bonini
Hey thanks! That was a good starting point... -Brian -Original Message- From: Andrey Hristov [mailto:[EMAIL PROTECTED]] Sent: Monday, December 10, 2001 9:35 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] RegEx gurus help... The code below does almost

[PHP] RegEx gurus help...

2001-12-07 Thread Brian V Bonini
I need to replace all relative links in an html doc with absolute links on the fly weather it be an image link, img src='/_imgs/imgs_nav/transPix.gif' width='10' height='13' img src='../_imgs/imgs_nav/transPix.gif' width='10' height='13' a URL, a href=/dealers/index.asp a link to an external JS

[PHP] Regex problem

2001-10-25 Thread Leon Mergen
Hi there, I am camping with a little regular expressions problem... Problem: I want to check if $variable begins with a * (star), and it doesn't matter if it starts with plenty of spaces... My solution: ereg(^[:space:]*\*,$variable) But, it doesn't seem to work with the space part... The

Re: [PHP] Regex problem

2001-10-25 Thread Kodrik
My solution: ereg(^[:space:]*\*,$variable) Try ereg(^[:space:]\**$,$variable) or ereg(^[ ]*\**$,$variable) or ereg(^[[:space:]]*\**$,$variable) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

[PHP] Regex

2001-09-15 Thread Boaz Yahav
Hi How does one extract a URL from HTML like : a href=/abc/def/0,1234,567.html?xxx=abcde class=MyClass I have an HTML file with many lines like this and I want to extract the /abc/def/0,1234,567.html?xxx=abcde part from each one. Assuming I can get the lines into an array, how can I extract

Re: [PHP] Regex

2001-09-15 Thread Rasmus Lerdorf
preg_match('/a href=(.*?)/i',$str,$reg); Your URL will now be in $reg[1] -Rasmus On Sat, 15 Sep 2001, Boaz Yahav wrote: Hi How does one extract a URL from HTML like : a href=/abc/def/0,1234,567.html?xxx=abcde class=MyClass I have an HTML file with many lines like this and I want to

[PHP] Regex help

2001-08-22 Thread Stefen Lars
Hello all In the Apache config file, we have the following directive: SetEnvIfNoCase Referer ^http://www.oursite.com/; local_ref=1 FilesMatch .(gif|jpg) Order Allow,Deny Allow from env=local_ref /FilesMatch We use this to prevent people from directly linking to .gif and .jpg files. This

[PHP] Regex question

2001-07-31 Thread Boaz Yahav
I'm trying to find if a string exists inside a string. Instead of using strstr() twice I want to use eregi() once. What I want to check is if HTTP/1.1 302 or HTTP/1.0 302 exists in some $output. I'm trying something like : eregi([\HTTP/1.\]+[0-1]+[\ 302\],$output) eregi([HTTP/1.]+[0-1]+[

RE: [PHP] Regex question

2001-07-31 Thread Boaz Yahav
In case anyone is interested, eregi(HTTP/1.[01].302,$output) seems to work :) berber -Original Message- From: Boaz Yahav Sent: Tuesday, July 31, 2001 2:03 PM To: PHP General (E-mail) Subject: [PHP] Regex question I'm trying to find if a string exists inside a string. Instead of using

RE: [PHP] regex for cleaning up username

2001-07-22 Thread Dave
Am partially successfull after taking a further look into things. the following (while ugnly) correctly catches everything except the \ character for some reason. ideas? if(preg_match(/['.' ,!@#$%\^*()+=\/\\:;?|]/',$MyString)){ # echo error, character found } -Original

Re: [PHP] regex for cleaning up username

2001-07-22 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Dave) wrote: Am partially successfull after taking a further look into things. the following (while ugnly) correctly catches everything except the \ character for some reason. ideas? if(preg_match(/['.'

Re: [PHP] regex help

2001-07-17 Thread Lasse
[mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 12:43 AM To: [EMAIL PROTECTED] Subject: [PHP] regex help hi all, a little OT here, but need some quick help. I have a bunch of e-mails to convert into sql entries and I'm stuck here. I have: , John Doe, [EMAIL PROTECTED], ..

[PHP] regex question

2001-07-16 Thread Julian Simpson
I'm trying to parse an existing html file using php. I need to use regex to find the first (and only the first) occurance of i and the last (and only the last) occurance of /i in a string. They will be replaced with ||. example of a string: blah blah isome stuff/i that i ineed to get/i blah

[PHP] regex help

2001-07-16 Thread Alvin Tan
hi all, a little OT here, but need some quick help. I have a bunch of e-mails to convert into sql entries and I'm stuck here. I have: , John Doe, [EMAIL PROTECTED], .. I just need to know what's the regex to switch around the name and e-mail address. TIA, @lvin -- PHP General

RE: [PHP] regex help

2001-07-16 Thread Jack Dempsey
What exactly are you trying to do? Switch around in what way? Jack -Original Message- From: Alvin Tan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 12:43 AM To: [EMAIL PROTECTED] Subject: [PHP] regex help hi all, a little OT here, but need some quick help. I have a bunch

[PHP] Regex Help

2001-07-13 Thread Sheridan Saint-Michel
I am trying to write a script that needs a list of all the images in an HTML file. I am trying this code if (eregi ((img.+src=)(.+)[\s],$buffer, $regs )) { echo $regs[2]BRBR; } The problem, however is that when it looks at IMG SRC=images/Logo.gif ALT=Only Child Club - The

RE: [PHP] Regex Help

2001-07-13 Thread Erick Calder
into the (). - e r i c k -Original Message- From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]] Sent: Friday, July 13, 2001 9:04 AM To: [EMAIL PROTECTED] Subject:[PHP] Regex Help I am trying to write a script that needs a list of all the images in an HTML file. I am trying

[PHP] regex questions

2001-07-10 Thread Jerry Lake
ok, I'm having some continual regex issues and perhaps someone can help me out with this. I've got a series of line of html that I am changing to xhtml and in doing so, each of those lines need to be appended with a / before the closeting bracket. the only pattern that they share is that the

Re: [PHP] regex questions

2001-07-10 Thread Christian Reiniger
On Tuesday 10 July 2001 23:04, Jerry Lake wrote: the only pattern that they share is that the end of the line ends with a number, quotes and a closing bracket i.e. 7 I can match that pattern, with .\d but when I try to replace it, I also replace the number at the end, and not just append

[PHP] regex for dynamic highlighting in search results...need help

2001-05-24 Thread hopeless
Forwarded to the list for suggestions...my regex is pretty rusty... -- I've got a string full of HTML, and I'd like to highlight specific words in the text by surrounding it with span class=highlight/span tags. That's pretty simple: $strIn =

Re: [PHP] regex

2001-05-24 Thread Dan Lowe
Previously, Gyozo Papp said: metacharacter. Is a '.' inside of a [] a literal '.', or a 'any character' A period inside a character class (i.e. inside a [] block) is just a period, and not a metacharacter. -dan -- Don't let it end like this. Tell them I said something.

[PHP] regex

2001-05-22 Thread Dennis Gearon
Is a '.' inside of a [] a literal '.', or a 'any character' metacharacter? -- - Look lovingly upon the present, for it holds the only things that are forever true. -

Re: [PHP] regex

2001-05-22 Thread Gyozo Papp
metacharacter. - Original Message - From: Dennis Gearon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2001. május 22. 09:34 Subject: [PHP] regex Is a '.' inside of a [] a literal '.', or a 'any character' ? -- - Look

Re: [PHP] RegEx Question

2001-05-21 Thread Gyozo Papp
if (preg_match_all(|testing(.*?);blah|s, $str, $matches)) { // do what you want with $matches: see in the manual! var_dump($matches); } - Original Message - From: George E. Papadakis [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: 2001. május 20. 19:18 Subject: [PHP] RegEx

[PHP] RegEx Question

2001-05-20 Thread George E. Papadakis
Hi, I have an ereg question::. $data = a big string , while (ereg (testing([^;]*);blah(.*),$data,$args)) { $this = $args[1]; $data = $args[2]; } What I wanna do ,obviously, is to get all the strings between 'testng' and 'blah' in an array. This will do it, yet when it wont work when

Re: [PHP] RegEx Question

2001-05-20 Thread Christian Reiniger
On Sunday 20 May 2001 19:18, George E. Papadakis wrote: I have an ereg question::. $data = a big string , while (ereg (testing([^;]*);blah(.*),$data,$args)) { $this = $args[1]; $data = $args[2]; } What I wanna do ,obviously, is to get all the strings between 'testng' and 'blah'

[PHP] regex pattern match and extract

2001-05-10 Thread Michael Roark
$sql=select nfo_gname from galaxy_nfo limit 1; $result=db_query($sql); if ($result) { while (list($nfo_gname)=mysql_fetch_row($result)) { echo ($nfo_gname); ereg (\[[a-zA-Z0-9]\], $nfo_gname, $regs); echo $regs[1]; I'm trying to match any thing between [] and pull it from the string and

RE: [PHP] regex pattern match and extract

2001-05-10 Thread ..s.c.o.t.t.. [gts]
:[EMAIL PROTECTED]] Subject: [PHP] regex pattern match and extract $sql=select nfo_gname from galaxy_nfo limit 1; $result=db_query($sql); if ($result) { while (list($nfo_gname)=mysql_fetch_row($result)) { echo ($nfo_gname); ereg (\[[a-zA-Z0-9]\], $nfo_gname, $regs); echo $regs[1]; I'm

[PHP] regex and mysql - looking for opinions.

2001-04-18 Thread Larry Hotchkiss
Im working on a site utilizing apaches/mysqp and of course php. Im working through the basic framwork creating forms to collect user input and do various searches etc. I was curious as to what most people find the best way keep thier mysql queries from getting messed up by user entered

Re: [PHP] regex and mysql - looking for opinions.

2001-04-18 Thread Plutarck
I use a special function just for reforming input, but they use the following bits with PCRE: $replace_wordwhite = '/[^\w\s]/'; $replace_word = '/\W/'; $replace_num = '/\D/'; $replace_email = '/[^\w\-\.@]/'; Works pretty well and it's quite useful for killing useless input without

Re: [PHP] regex help...again

2001-03-30 Thread Christian Reiniger
On Friday 30 March 2001 06:47, you wrote: Ok, i have a text file with lines that looks like this: 14```value```value2`value3 This would be fine, except...there are sometimes more than in other columns, so id like it to be 14``value``value2``value3 $new = preg_replace ('/`+/',

Re: [PHP] regex help...again

2001-03-30 Thread elias
So as you seem to be good with regexps, can you tell me how i can write a code that will search for next occurence in a string? where pattern is a regexp and a string is long and ofcourse there will be lots of pattern matchs in it...? thanks "Christian Reiniger" [EMAIL PROTECTED] wrote in

Re: [PHP] regex help...again

2001-03-30 Thread Christian Reiniger
On Saturday 31 March 2001 00:07, you wrote: So as you seem to be good with regexps, can you tell me how i can write a code that will search for next occurence in a string? where pattern is a regexp and a string is long and ofcourse there will be lots of pattern matchs in it...? What about

[PHP] regex help...again

2001-03-29 Thread David Balatero
Ok, i have a text file with lines that looks like this: 14```value```value2`value3 This would be fine, except...there are sometimes more than in other columns, so id like it to be 14``value``value2``value3 So I can explode() it into a mysql database. Can anyone offer a regexp for

Re: [PHP] regex help...again

2001-03-29 Thread elias
It's a lame way, but it works, I sure hope that someone can tell me how to do it in pure regexp. like how can i 'search for next occurence' in ereg or any regexp() in PHP - ? $str = "14```value```value2`value3``hehe!``hohoho"; while ( ereg("[^`]+", $str, $result) ) { $match =

Re: [PHP] Regex Masters: Please inspect this regex- Pulling urls out of page

2001-03-08 Thread Christian Reiniger
On Thursday 08 March 2001 09:19, you wrote: I'm putting together a regex to pull all of the urls out of a web page. Not the href tag, but just the url part of that tag. Here's what I've come up with: preg_match_all('/.*href\s*=\s*(\"|\')?(.*?)(\s|\"|\'|)/i', $html, $matches);

[PHP] Regex Masters: Please inspect this regex- Pulling urls out of page

2001-03-07 Thread Matt Friedman
I'm putting together a regex to pull all of the urls out of a web page. Not the href tag, but just the url part of that tag. Here's what I've come up with: preg_match_all('/.*href\s*=\s*(\"|\')?(.*?)(\s|\"|\'|)/i', $html, $matches); foreach($matches[2] as $m) print "P$m\n"; All regex masters

Re: [PHP] regex frustration

2001-02-28 Thread Simon Garner
From: "Jerry Lake" [EMAIL PROTECTED] I've tried and tried to no avail, can someone assist I need to select the first space in a line like the following Nelson Bob and Mary, 123 Street st., Ashton, 555-1212 I need to replace the space between Nelson and Bob with a comma so I can separate

Re: [PHP] regex frustration

2001-02-28 Thread Chris
Try the perl compatible one, you can set a limit of how many times to replace: http://www.php.net/manual/en/function.preg-replace.php I've tried and tried to no avail, can someone assist I need to select the first space in a line like the following Nelson Bob and Mary, 123 Street st.,

[PHP] regex help

2001-02-27 Thread Jerry Lake
how do I select the first space after some alpha-numeric characters? I can ^\D\s to get the characters and the space, but how can I select the space only? Jerry Lake- [EMAIL PROTECTED] Web Designer Europa Communications - http://www.europa.com Pacifier Online -

[PHP] regex help

2001-02-23 Thread John Vanderbeck
Hello, I need to take a string and remove everything from the first "" character to the end of the line. I'm pretty sure I could do this with an ereg_replace(), but I am horrible at regular expressions. Could anyone help me with this? - John Vandebreck - Admin, GameDesign -- PHP General

Re: [PHP] regex help

2001-02-23 Thread Christian Reiniger
On Friday 23 February 2001 19:33, John Vanderbeck wrote: I need to take a string and remove everything from the first "" character to the end of the line. I'm pretty sure I could do this with an ereg_replace(), but I am horrible at regular expressions. Could anyone help me with this?

[PHP] Regex problems.....

2001-02-22 Thread Ian LeBlanc
Guys/Gals: For some reason too long to explane .. i have this site that i need to make all the image names in an image src all lowercase.. Here is what I have so far. Please someone tell me what I am doing wrong. ? $contents="img src=ThisOneReallyNeedsToBeAllLowercase.gif

Re: [PHP] Regex problems.....

2001-02-22 Thread Phillip Bow
You should either do this with ereg, or strtolower and not a combination of the two, and in all actuality strtolower is specifically desinged to do this very easily so I would go with it. ? $contents="img src=ThisOneReallyNeedsToBeAllLowercase.gif alt=ThisOneReallyNeedsToBeAllLowercase.gif";

Re: [PHP] REGEX prob

2001-02-18 Thread n e t b r a i n
Hi Christian, 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 expressions, so it tries to find the literal

<    2   3   4   5   6   7   8   >