Re: [PHP] urgent. need posix-style regexp expert

2001-09-05 Thread


From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tue, Sep 04, 2001 at 07:48:27PM +0200
Message-ID: <[EMAIL PROTECTED]>
Subject: [PHP] urgent. need posix-style regexp expert

> 
> what is the correct POSIX-regexp to match a range of characters
> between two parantheses, while ensuring that it is the largest
> match possible? need fast reply. thanks.
> 
> Running against
> 
>(foo (bar (baaz) quux( fred woody) wang))
> 
> it should return
> 
>foo (bar (baaz) quux( fred woody) wang)
> 
> 
> 
>  D. Alvarez Arribas <[EMAIL PROTECTED]>





Here's your regex:

--- PHP Code ---

");
print_r ($regs);
  } else {
print ("No match... sorry!");
  }
?>

--- End of PHP Code ---

So the expr to use: ^[^(]*\((.+)\)[^)]*$



-- 

* R&zE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] urgent. need posix-style regexp expert

2001-09-04 Thread alvarez


what is the correct POSIX-regexp to match a range of characters
between two parantheses, while ensuring that it is the largest
match possible? need fast reply. thanks.

Running against

   (foo (bar (baaz) quux( fred woody) wang))

it should return

   foo (bar (baaz) quux( fred woody) wang)



 D. Alvarez Arribas <[EMAIL PROTECTED]>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]