Re: [PHP] help with preg_match

2012-06-04 Thread Chris Purves
On 2012-06-03 22:37, Robert Williams wrote: On Jun 3, 2012, at 17:28, Chris Purvesch...@northfolk.ca wrote: I know that the text ends 'end', but I don't know what the Something, something is. I am using preg_match as follows: preg_match('/[^]*end/',$curl_response,$matches); I want to

[PHP] help with preg_match

2012-06-03 Thread Chris Purves
Hello, I am trying to use preg_match to match something from an html file. Within the html file is some text that looks like: spanSomething, something end/span I know that the text ends 'end', but I don't know what the Something, something is. I am using preg_match as follows:

Re: [PHP] help with preg_match

2012-06-03 Thread Robert Williams
On Jun 3, 2012, at 17:28, Chris Purves ch...@northfolk.ca wrote: I know that the text ends 'end', but I don't know what the Something, something is. I am using preg_match as follows: preg_match('/[^]*end/',$curl_response,$matches); I want to match 'end' and everything before it that is not

RE: [PHP] help with preg_match

2012-06-03 Thread admin
-Original Message- From: Chris Purves [mailto:ch...@northfolk.ca] Sent: Sunday, June 03, 2012 8:26 PM To: php-general General Subject: [PHP] help with preg_match Hello, I am trying to use preg_match to match something from an html file. Within the html file is some text that looks

[PHP] Help with preg_match and windows domain logins...

2005-12-12 Thread Daevid Vincent
I'm trying to do what should be a very simple regex, but can't seem to get PHP to work, yet regex-coach and even an XML .XSD work fine: Valid forms of a windows logon are: foo\bar \\foo\bar function isValidWinLogon($logon) { //$logon = 'foo\\bar'; $logon = '\\foo\bar'; print PPRElogon =

Re: [PHP] Help with preg_match and windows domain logins...

2005-12-12 Thread Robin Vickery
On 12/13/05, Daevid Vincent [EMAIL PROTECTED] wrote: I'm trying to do what should be a very simple regex, but can't seem to get PHP to work, yet regex-coach and even an XML .XSD work fine: Valid forms of a windows logon are: foo\bar \\foo\bar [...] //preg_match('/()?.+(\\).+/',

[PHP] help with preg_match

2003-01-04 Thread Anders Thoresson
Hi, I'm trying to write a function that validates the input in a textarea. I just want to allow alphanumrical characters, and if the user enters anything else, I display an error message by calling error(). But the following doesn't work. Even if I enter hello in the textarea, I get the

Re: [PHP] help with preg_match

2003-01-04 Thread Tracy Finifter Rotton
You need to tell preg_match that there will be multiple characters. Right now, you're searching for one, and only one. if (! preg_match ('/^[a-z0-9]+$/', $unchecked_text)) { The + means one or more matches to the range in brackets. -- tracy On 1/4/03 9:03 AM, Anders Thoresson [EMAIL