On Wed, 2010-06-23 at 00:36 +0900, Manuel Manu00 wrote:
> Hello
> 
> I would like to parse or regexp the following string :
> 
> <script type="text/javascript">
>   google_ad_client = "pub-9423056098431875";
>   /* 300x250, created 6/10/09 */
>   google_ad_slot = "1755518182";
>   google_ad_width = 300;
>   google_ad_height = 250;
>   </script>

matched = /google_ad_client\s*=\s*\"([^"]+)\"/.match(string)
google_ad_client = matched ? matched[1] : nil

seems flexible-ish, and might do what you want.

-- 
Matthew