RE: [PHP] regex

2002-03-02 Thread Boaz Yahav
Maybe this can help : pick up an array of variables from a query string such as: http://www.archipro.com/test.php?state=AB&state=BC http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=3265 Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take

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=" ".$str

RE: [PHP] Regex function needed

2002-02-07 Thread Martin Towell
ot;.", $str); $str = str_replace(",.", ".", $str); echo $str; -Original Message- From: Douglas Maclaine-cross [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 11:09 AM To: 'Edward van Bilderbeek - Bean IT'; Michael Kimsal; [EMAIL PROTECTED]

RE: [PHP] Regex function needed

2002-02-07 Thread Douglas Maclaine-cross
;, $str); $str = eregi_replace('^[a-z\']{1,3} ', '', $str); $str = eregi_replace('^[a-z\']{1,3}([^a-z\'])', '\1', $str); $str = eregi_replace(' [a-z\']{1,3}$', '', $str); $str = eregi_replace('([^a-z\' ])[a-

Re: [PHP] Regex function needed

2002-02-07 Thread Edward van Bilderbeek - Bean IT
m: "Bas Jobsen" <[EMAIL PROTECTED]> To: "Michael Kimsal" <[EMAIL PROTECTED]>; <[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

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. -- 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 Martin Towell
To: [EMAIL PROTECTED]; 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} ", $s

Re: [PHP] Regex function needed

2002-02-07 Thread Edward van Bilderbeek - Bean IT
})[a-z']{1,3}([ ]{1}|[,]{1}|[.]{1} |[:]{1})", "\\2", $str); } Greets, Edward print $str; - Original Message - From: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Michael Kimsal" <[EMAIL PRO

Re: [PHP] Regex function needed

2002-02-07 Thread Edward van Bilderbeek - Bean IT
I don't know if this is the best way but: $str = "This is or was a test for short words"; while (ereg(" [a-z]{1,3} ", $str)) { $str = eregi_replace(" [a-z]{1,3} ", " ", $str); } print $str; this replaces all occurences of a space followed by 1,2 or 3 alphabetic characters followed by a space.

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 Lo

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]; > ^lin

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 = spli

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("/<\/ I'm wondering if that ( not only

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 e

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

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", >""); 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/", ..." eg. then it get's eva

Re: [PHP] RegEx gurus help...

2001-12-12 Thread Andrey Hristov
The code below does almost of the job. There is only one problem. If some path is absolute to the server /aaa/bbb/ the path get file://aaa// but I think no problems with apache. HTH Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS a URL, a link to an external JS

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... > > >

RE: [PHP] RegEx gurus help...

2001-12-10 Thread Jack Dempsey
from the way you describe, i can't help but think that it'd be one hell of a regex.if all you're doing is stripping out .. i'd load up your fav editor and do a search and replace where you can approve each changeor, just change them all and fix what's broken.it'll be much quicker than

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 PROTECT

Re: [PHP] Regex

2001-09-15 Thread Rasmus Lerdorf
preg_match('/ Hi > > How does one extract a URL from HTML like : > > > > 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 only the > URL part? > > I trie

Re: [PHP] Regex question

2001-07-31 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Boaz Yahav) wrote: > In case anyone is interested, eregi("HTTP/1.[01].302",$output) seems to > work :) "." == "any character" (including, but not necessarily, a period). If you want to match a period, escape it or put it in square braces: e

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 usin

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 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 Message

Re: [PHP] regex help

2001-07-16 Thread Lasse
I think he means swap... -- Lasse "Jack Dempsey" <[EMAIL PROTECTED]> wrote in message 000601c10e81$03aca260$22ebd73f@2pqjp01">news:000601c10e81$03aca260$22ebd73f@2pqjp01... > What exactly are you trying to do? "Switch around" in what way? > > Jack > > -Original Message- > From: Alvin Ta

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 o

RE: [PHP] Regex Help

2001-07-13 Thread Erick Calder
Sheridan, I didn't test this in PHP, I'm more familiar with the Perl Regex, but this might work for you, play with it: /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 a

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

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.

Re: [PHP] regex

2001-05-22 Thread CC Zona
> > Is a '.' inside of a [] a literal '.', or a 'any character' > metacharacter. In what regex syntax? In POSIX (ereg_*) and in PCRE (preg_*): [.]//match a period \.//match a period . //match one instance of any character (which could be a period) [[.foo.]] //match string "foo" (

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' > ? > -- > --

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] R

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' > a

RE: [PHP] regex pattern match and extract

2001-05-10 Thread ..s.c.o.t.t.. [gts]
use match_all to get an array of matches. $s = "[VET]We r NOT [PA]-Crew [TC]"; preg_match_all('/\[.*?\]/', $s, $matches); while (list($k,$v) = each($matches[0])) { print "$k = $v\n"; } prints: 0 = [VET] 1 = [PA] 2 = [TC] > -Original Message- > From: Michael Roark [mailto:[

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

2001-04-19 Thread Christian Reiniger
On Wednesday 18 April 2001 22:03, you wrote: > 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 data. None of my searches or database data has or needs any Simply using addslashes () or the mag

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 returning

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

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 mess

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-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 - "; echo "matched: $match\n"; } ?> - ""David Balatero"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[E

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); > for

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., Ash

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 sep

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?

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 = strtolower($contents); ?> Should do what you want. -- phill "Ian LeBlanc" <[EMAIL PROTECTED

Re: [PHP] REGEX prob

2001-02-18 Thread n e t b r a i n
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

Re: [PHP] REGEX prob

2001-02-18 Thread Christian Reiniger
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}"," >>l() ;?>", $html_code); > > > >str_replace doesn't know ab

RE: [PHP] REGEX prob

2001-02-18 Thread ..s.c.o.t.t..
did you check the value *before* writing it to a file? before trying to solve any problem, you have to know where to look perhaps the problem lies with the file instead of the regexp. the following code worked great for me: Lnk'; $html = preg_replace('/&flag=(\d{9})&PHPSESSID=(\w{32})/', ap

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}",">;?>", $html_code); >str_replace doesn't know about regular expressions, so it tries to find >the literal st

Re: [PHP] REGEX prob

2001-02-17 Thread Christian Reiniger
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}",";?>", $html_code); str_replace doesn't know about regular expressio

Re: [PHP] regex

2001-02-16 Thread Christian Reiniger
On Thursday 15 February 2001 22:43, Jerry Lake wrote: > is there a way I can make a regex to add a comma > to the beginning of every line of a comma delimited > file ? $NewContent = preg_replace ('/^(.)/m', ',\\1', $OldContent); -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Wh

RE: [PHP] Regex help needed...

2001-02-13 Thread PHPBeginner.com
Maxim Maletsky Founder, Chief Developer 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...

Re: [PHP] Regex help needed...

2001-02-12 Thread Jesse Swensen
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

Re: [PHP] Regex help needed...

2001-02-12 Thread Christian Reiniger
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 between words, leave them alone. > but I wanted to convert

Re: [PHP] Regex help needed...

2001-02-12 Thread Jason Stechschulte
> 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

Re: [PHP] Regex help needed...

2001-02-12 Thread Jesse Swensen
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

RE: [PHP] Regex help needed...

2001-02-12 Thread PHPBeginner.com
rtrim() www.php.net/rtrim Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Jesse Swensen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 13, 2001 2:15 AM To: [EMAIL PROTECT

Re: [PHP] Regex help needed...

2001-02-12 Thread Jason Stechschulte
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("(^ )|

Re: [PHP] regex : Extracting parts of a string :-???

2001-02-11 Thread Christian Reiniger
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,

Re: [PHP] regex with non-ascii characters

2001-01-30 Thread Jeff Warrington
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

RE: [PHP] REGEX for tag attributes?

2001-01-17 Thread Robert Collins
Thomas, Not sure if this si what you want but it may start you in the right direction. "; preg_match_all( '/\S*\s?=\s?\S+[^>]/', $bob, $match ); foreach ($match[0] as $match_result) { echo $match_result.""; } ?> Robert W. Collins Web Developer II Insight / TC Computers www.insigh

RE: [PHP] Regex for telephone number

2001-01-15 Thread Jason Murray
> 123 4567 > 1234567 > +91 44 123 4567 > +91 44 1234567 > 91-44-123 4567 > 91-44-1234567 So, 91441234567 and 9 1 4 4 1 2 3 4 5 6 7 aren't valid? You *could* apply a rule here, but it's fallible. 1. Strip out everything thats not a number (ereg_replace("[^0-9]", "")). 2. Count the number of dig

Re: [PHP] Regex for telephone number

2001-01-15 Thread Vikram Vaswani
Thanks for the reply. I'd like to ensure that numbers entered are in any of these formats: 123 4567 1234567 +91 44 123 4567 +91 44 1234567 91-44-123 4567 91-44-1234567 Number will be a minimum of 5 digits. TIA Vikram At 12:11 AM 1/16/01 +1100, Angus Mann wrote: >At 17:55 15/01/01 +0500, Vikr

RE: [PHP] Regex for telephone number

2001-01-15 Thread Jason Murray
> Can someone help me out with a regex to validate a phone number? That's a tough one, because 555- is just as valid as 1-800-BILLME. And here in Australia we have 131166 (yes, all you Aussies, that *IS* Pizza Hut's number... I couldn't think of any others :)) The best you can really do is m

Re: [PHP] Regex for telephone number

2001-01-15 Thread Alex Black
case "phone_us": if(ereg("^([2-9][0-9]{2})([2-9][0-9]{2})([0-9]{4})$", $var)){ return TRUE; }else{ set_stringtypes_error(throw_error3("lib_string_types_108", $var)); } break; case "phone_int": if(!preg_match("/[^0-9\(\)\-\. ]/", $var)){ return TRUE; }else{ se

RE: [PHP] Regex for telephone number

2001-01-15 Thread Spallek, Heiko
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 L

Re: [PHP] Regex for telephone number

2001-01-15 Thread Angus Mann
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: [EMAI

Re: [PHP] REGEX

2001-01-14 Thread Rasmus Lerdorf
First, the ()'s in the split regex makes no sense. Split has no registers to save stuff to. Second, that is a rather clunky way to loop through an array. Third, since the regex in split defines the delimiter to use to split the string on, the actual "1 -->" part of the data is gone. Why are yo

RE: [PHP] regex

2001-01-12 Thread Cynic
;([[:alpha:]]+) ", "\\1".",", $test); >>that works to 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

RE: [PHP] regex

2001-01-12 Thread Cynic
ot;([[:alpha:]]+) ", "\\1".",", $test); >that works to 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 PR

RE: [PHP] regex

2001-01-12 Thread Jerry Lake
pt 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] regex looks like yo

RE: [PHP] regex

2001-01-12 Thread Cynic
>>and how would I go about that? >> >>Jerry Lake >> >>-Original Message- >>From: Cynic [mailto:[EMAIL PROTECTED]] >>Sent: Friday, January 12, 2001 3:10 PM

RE: [PHP] regex

2001-01-12 Thread Jerry Lake
bout 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 o

Re: [PHP] regex

2001-01-12 Thread Steve Edberg
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 conver

RE: [PHP] regex

2001-01-12 Thread Cynic
t;-Original Message- >From: Cynic [mailto:[EMAIL PROTECTED]] >Sent: Friday, January 12, 2001 3:10 PM >To: Jerry Lake; [EMAIL PROTECTED] >Subject: Re: [PHP] regex > > >yes > >At 23:54 12.1. 2001, Jerry Lake wrote the following: >---

RE: [PHP] regex

2001-01-12 Thread Jerry Lake
and how would I go about that? Jerry Lake -Original Message- From: Cynic [mailto:[EMAIL PROTECTED]] Sent: Friday, January 12, 2001 3:10 PM To: Jerry Lake; [EMAIL PROTECTED] Subject: Re: [PHP] regex yes At 23:54 12.1. 2001, Jerry Lake wrote the following

Re: [PHP] regex

2001-01-12 Thread Cynic
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

<    1   2   3   4   5   6