Hi Folks,
I have a serious problem.
must create a regular expression against all that is between single quote or
double quotes. Easy? Ok, i know, but i need that everything must to be too
an single quote or double quote.
If i have this SQL command:
SELECT * FROM TSTRENIC.MEI_ACESSO WHERE
Hello,
I have a quirky behavior I'm trying to resolve.
I have a REGEX that will find a function definition in a php file:
.function InsertQuery($table,$fields,$values).
the REGEX is:
$regex='/function [a-z]* *([$a-zA-Z]*)/';
the problem is that:
1. a slash is automattically put in front
-Original Message-
From: MikeP [mailto:mpel...@princeton.edu]
Sent: Thursday, December 18, 2008 8:43 AM
To: php-general@lists.php.net
Subject: [PHP] Regex Problem
Hello,
I have a quirky behavior I'm trying to resolve.
I have a REGEX that will find a function definition in a php
Boyd, Todd M. tmbo...@ccis.edu wrote in message
news:33bde0b2c17eef46acbe00537cf2a190037b7...@exchcluster.ccis.edu...
-Original Message-
From: MikeP [mailto:mpel...@princeton.edu]
Sent: Thursday, December 18, 2008 8:43 AM
To: php-general@lists.php.net
Subject: [PHP] Regex Problem
Hi there,
I do work on following regex:
^(.*)_a[0-9](.*).htm$
This should be valid for test_a9393.htm, but not for 9393.htm as
ther is no leading _a infront of the number.
Unfortunatelly this also works for the 9393.htm file. Can somebody give
me a hint why the regex also is true for text
On 01/06/06, Merlin [EMAIL PROTECTED] wrote:
Hi there,
I do work on following regex:
^(.*)_a[0-9](.*).htm$
This should be valid for test_a9393.htm, but not for 9393.htm as
ther is no leading _a infront of the number.
Unfortunatelly this also works for the 9393.htm file. Can somebody give
me
Dave Goodchild schrieb:
On 01/06/06, Merlin [EMAIL PROTECTED] wrote:
Hi there,
I do work on following regex:
^(.*)_a[0-9](.*).htm$
This should be valid for test_a9393.htm, but not for 9393.htm as
ther is no leading _a infront of the number.
Unfortunatelly this also works for the 9393.htm
[snip]
Hi there,
I do work on following regex:
^(.*)_a[0-9](.*).htm$
This should be valid for test_a9393.htm, but not for 9393.htm as
ther is no leading _a infront of the number.
Unfortunatelly this also works for the 9393.htm file. Can somebody give
me a hint why the regex also is true for
On 01/06/06, Merlin [EMAIL PROTECTED] wrote:
Hi there,
I do work on following regex:
^(.*)_a[0-9](.*).htm$
This should be valid for test_a9393.htm, but not for 9393.htm as
ther is no leading _a infront of the number.
Unfortunatelly this also works for the 9393.htm file. Can somebody give
me a
Robin Vickery schrieb:
On 01/06/06, Merlin [EMAIL PROTECTED] wrote:
Hi there,
I do work on following regex:
^(.*)_a[0-9](.*).htm$
This should be valid for test_a9393.htm, but not for 9393.htm as
ther is no leading _a infront of the number.
Unfortunatelly this also works for the 9393.htm
Merlin wrote:
Hi there,
I do work on following regex:
^(.*)_a[0-9](.*).htm$
This should be valid for test_a9393.htm, but not for 9393.htm as
ther is no leading _a infront of the number.
Unfortunatelly this also works for the 9393.htm file. Can somebody give
me a hint why the regex also is
On Thu, June 1, 2006 4:56 am, Merlin wrote:
^(.*)_a[0-9](.*).htm$
Don't know what it will help, but you need \\.htm in PHP to get \.htm
in PCRE to escape the . in the extension.
--
Like Music?
http://l-i-e.com/artists.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
I'm trying to get a simple regex to work. Here is the test script I have.
#!/usr/bin/php -q
?
$string = hello\nworld\n;
$string = preg_replace(/[^\r]\n/i,\r\n,$string);
$string = addcslashes($string, \r\n);
print $string;
?
This outputs
hell\r\nworl\r\n
so it's removing the char before the
On Thu, 1 Jul 2004 16:41:50 -0500, Josh Close [EMAIL PROTECTED] wrote:
I'm trying to get a simple regex to work. Here is the test script I have.
#!/usr/bin/php -q
?
$string = hello\nworld\n;
$string = preg_replace(/[^\r]\n/i,\r\n,$string);
$string =
Why is it taking the char before the [^\r] also?
-Josh
On Thu, 1 Jul 2004 15:17:04 -0700, Justin Patrin [EMAIL PROTECTED] wrote:
On Thu, 1 Jul 2004 16:41:50 -0500, Josh Close [EMAIL PROTECTED] wrote:
I'm trying to get a simple regex to work. Here is the test script I have.
* Thus wrote Justin Patrin:
On Thu, 1 Jul 2004 16:41:50 -0500, Josh Close [EMAIL PROTECTED] wrote:
I'm trying to get a simple regex to work. Here is the test script I have.
#!/usr/bin/php -q
?
$string = hello\nworld\n;
$string = preg_replace(/[^\r]\n/i,\r\n,$string);
$string
Hi there,
I have a regex problem.
Basicly I do not want to match:
/dir/test/contact.html
But I do want to match:
/test/contact.html
I tryed this one:
^[!dir]/(.*)/contact(.*).html$
but it does not work and I tryed thousands of other ways plus read
tutorials.
Can anybody please help?
Thanx
On 15 August 2003 12:02, Merlin wrote:
Hi there,
I have a regex problem.
Basicly I do not want to match:
/dir/test/contact.html
But I do want to match:
/test/contact.html
I tryed this one:
^[!dir]/(.*)/contact(.*).html$
Well, that's not going to work because the construct
Hello,,
I have a preg_match issue matching numbers. I am currently using
!preg_match ('/([0-9\-\.\#:])/', $_POST['nums1']
throw error[]
This fails if you use something like ' asdf ' but if you use ' asdf789 ' it passes
false and does not throw an error.
This is not the obvious
]
Sent: Saturday, May 31, 2003 11:46 AM
Subject: [PHP] regex problem
Hello,,
I have a preg_match issue matching numbers. I am currently using
!preg_match ('/([0-9\-\.\#:])/', $_POST['nums1']
throw error[]
This fails if you use something like ' asdf ' but if you use ' asdf789 ' it
passes false
: Saturday, May 31, 2003 6:04 PM
Subject: Re: [PHP] regex problem
Are you wanting the $_POST['nums1'] to have only numbers, -, ., #, :
Is this what you are trying to match. if so, try this.
if ( preg_match(/[^0-9\#\:\.\-]/, $_POST['nums1']) ) {
throw error()
}
This will match
suppose there's a string
$string=I like my(hot) coffee with sugar and (milk)(PHP);
I would like to get an output of all possible combinations of the
sentence
with the words between brackets:
eg.
I like my hot coffee with sugar and
I like my hot coffee with sugar and milk
I like my hot
hi,
suppose there's a string
$string=I like my(hot) coffee with sugar and (milk)(PHP);
I would like to get an output of all possible combinations of the sentence
with the words between brackets:
eg.
I like my hot coffee with sugar and
I like my hot coffee with sugar and milk
I like my hot
suppose there's a string
$string=I like my(hot) coffee with sugar and (milk)(PHP);
I would like to get an output of all possible combinations of the sentence
with the words between brackets:
eg.
I like my hot coffee with sugar and
I like my hot coffee with sugar and milk
I like my hot
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
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
26 matches
Mail list logo