[PHP] Re: Regex Problem

2009-07-31 Thread Igor Escobar
The solution don't need to be with regex, if anyone can solve this with other way will be very helpfull . Regards, Igor Escobar Systems Analyst Interface Designer + http://blog.igorescobar.com + http://www.igorescobar.com + @igorescobar (twitter) On Fri, Jul 31, 2009 at 2:23 PM, Igor

[PHP] Re: Regex Problem

2009-07-31 Thread Shawn McKenzie
Igor Escobar wrote: The solution don't need to be with regex, if anyone can solve this with other way will be very helpfull . Regards, Igor Escobar Systems Analyst Interface Designer + http://blog.igorescobar.com + http://www.igorescobar.com + @igorescobar (twitter) On

Re: [PHP] Re: Regex Problem

2009-07-31 Thread Shawn McKenzie
Igor Escobar wrote: No no, i need to make an regex to match the bold areas in my string. Anything between single quotes or double quotes (including quotes and double quotes). Understand? Regards, Igor Escobar Systems Analyst Interface Designer + http://blog.igorescobar.com +

Re: [PHP] Re: Regex Problem

2009-07-31 Thread Shawn McKenzie
Shawn McKenzie wrote: Igor Escobar wrote: No no, i need to make an regex to match the bold areas in my string. Anything between single quotes or double quotes (including quotes and double quotes). Understand? Regards, Igor Escobar Systems Analyst Interface Designer +

[PHP] Re: regex problem

2004-07-01 Thread Lars Torben Wilson
Josh Close 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); First, the short version. You can fix this by using backreferences: $string = preg_replace(/([^\r])\n/i,

[PHP] Re: regex problem

2004-07-01 Thread Josh Close
Thanks, that's exactly what I was looking for. -Josh On Thu, 01 Jul 2004 15:17:41 -0700, Lars Torben Wilson [EMAIL PROTECTED] wrote: Josh Close 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;

[PHP] Re: regex problem

2003-08-15 Thread Kae Verens
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$ but it does not work and I tryed thousands of other ways plus read tutorials. Can anybody please

[PHP] Re: regex problem

2003-08-15 Thread Merlin
^\/test\/contact.html$ does not work. I am sorry, I just found that it has to be: test/contact.html and not dir/test/contact.html there is no leading slash. Do you have any other suggestion? -- lt;IFRAME SRC=http://saratoga.globosapiens/associates/report_member.php?u=3color=EEE EEE

Re: [PHP] Re: regex problem

2003-08-15 Thread John W. Holmes
Merlin wrote: ^\/test\/contact.html$ does not work. I am sorry, I just found that it has to be: test/contact.html and not dir/test/contact.html there is no leading slash. Do you have any other suggestion? Are you making this too hard? if($string = 'test/contact.html') { echo 'good'; } else {

[PHP] Re: regex problem

2003-08-15 Thread Kae Verens
Merlin wrote: ^\/test\/contact.html$ does not work. I am sorry, I just found that it has to be: test/contact.html and not dir/test/contact.html there is no leading slash. Do you have any other suggestion? *sigh* ^test\/contact.html$ Kae -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Re: regex problem

2003-08-15 Thread John W. Holmes
John W. Holmes wrote: Merlin wrote: ^\/test\/contact.html$ does not work. I am sorry, I just found that it has to be: test/contact.html and not dir/test/contact.html there is no leading slash. Do you have any other suggestion? Are you making this too hard? if($string = 'test/contact.html')

RE: [PHP] Re: regex problem

2003-08-15 Thread Jay Blanchard
[snip] if($string = 'test/contact.html') That's if($string == 'test/contact.html') of course... :) [/snip] it could be if($string == test/contact.html) couldn't resist :) Jay P.S. John, nothing on that thing yet. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: regex problem

2003-08-15 Thread Merlin
ufff.. sorry guys, but I have to explain that better. I appreciate your help, maybe I did not give enough info. I am trying to redirect with apache modrewrite. To do this you have to use regex (not if functions:-) My problem is, that there are member accounts which look like that:

Re: [PHP] Re: regex problem

2003-08-15 Thread Kae Verens
Jay Blanchard wrote: if($string == 'test/contact.html') it could be if($string == test/contact.html) not to start a flame war or anything, but isn't the apostrophe version quicker, as it doesn't ask the server to parse the string? Kae -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: regex problem

2003-08-15 Thread Kae Verens
Merlin wrote: ufff.. sorry guys, but I have to explain that better. I appreciate your help, maybe I did not give enough info. I am trying to redirect with apache modrewrite. To do this you have to use regex (not if functions:-) My problem is, that there are member accounts which look like that:

Re: [PHP] Re: regex problem

2003-08-15 Thread Marek Kilimajer
So ^[^/]+/[^/]* or ^!(partner/) Merlin wrote: ufff.. sorry guys, but I have to explain that better. I appreciate your help, maybe I did not give enough info. I am trying to redirect with apache modrewrite. To do this you have to use regex (not if functions:-) My problem is, that there are

Re: [PHP] Re: regex problem

2003-08-15 Thread Merlin
does not work. Is there not a way to exclude the word partner like you triede with !(partner) ? merlin Marek Kilimajer [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] So ^[^/]+/[^/]* or ^!(partner/) Merlin wrote: ufff.. sorry guys, but I have to explain that better.

[PHP] Re: regex problem

2003-08-15 Thread Merlin
Good idea, but does not work either - surprisingly! - There should be a clean way with regex for this task. Andy regex expert in here? Merlin Kae Verens [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Merlin wrote: ufff.. sorry guys, but I have to explain that better. I

Re: [PHP] Re: regex problem

2003-08-15 Thread Curt Zirzow
* Thus wrote Merlin ([EMAIL PROTECTED]): ufff.. sorry guys, but I have to explain that better. I appreciate your help, maybe I did not give enough info. I am trying to redirect with apache modrewrite. To do this you have to use regex (not if functions:-) I'm not sure what you expect since

Re: [PHP] Re: regex problem

2003-08-15 Thread Curt Zirzow
* Thus wrote Kae Verens ([EMAIL PROTECTED]): Jay Blanchard wrote: if($string == 'test/contact.html') it could be if($string == test/contact.html) not to start a flame war or anything, but isn't the apostrophe version quicker, as it doesn't ask the server to parse the string? heh,

RE: [PHP] Re: regex problem

2003-08-15 Thread Wouter van Vliet
part of the url and looks up untill the end. Again a string containing no slashes Hope it does do what I expect it to do .. ;) Wouter -Oorspronkelijk bericht- Van: Merlin [mailto:[EMAIL PROTECTED] Verzonden: vrijdag 15 augustus 2003 16:21 Aan: [EMAIL PROTECTED] Onderwerp: [PHP] Re

RE: [PHP] Re: regex problem

2003-06-03 Thread Ford, Mike [LSS]
-Original Message- From: Monty [mailto:[EMAIL PROTECTED] Sent: 31 May 2003 21:21 If you want the entire string to be tested for digits, you need to add the length of the string to the regex pattern: $length = strlen($data); preg_match([0-9]{$length}, $data); Or anchor

[PHP] Re: regex problem

2003-06-01 Thread Monty
I don't understand what it is you're trying to accomplish, so, it's hard to offer a solution. If you just want to verify whether or not a variable contains numeric data, why not just use the is_numeric() function: http://us4.php.net/manual/en/function.is-numeric.php preg_match() will return

[PHP] Re: Regex problem

2001-10-25 Thread liljim
Hello Leon, try this if (preg_match(/^([[:space:]]*)?\*/s, $string)) { echo Match.; } else { echo No match; } James Leon Mergen [EMAIL PROTECTED] wrote in message 002f01c15d2a$e4ca3030$012aa8c0@leon">news:002f01c15d2a$e4ca3030$012aa8c0@leon... Hi there, I am camping with a little regular

[PHP] Re: Regex problem

2001-10-25 Thread Calin Uioreanu
$sNoSpaces = ltrim($variable); if ('*' == $sNoSpaces[0]) -- Regards, -- Calin Uioreanu [EMAIL PROTECTED] Tel: +49 - (0) 89 - 25 55 17 23 http://www.ciao.com -- Leon Mergen [EMAIL PROTECTED] wrote in