Capturing substrings with preg_match_all()

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm experiencing a problem when trying to capture substrings with
preg_match_all() from strings like


using the following Regular Expression (PERL syntax):


The resulting matches array looks like this:

    [0] => Array
            [0] => set('Hello','World')

    [1] => Array
            [0] => World


I wonder why "Hello" is not in the matches array. Did I do something
wrong in my Regular Expression?

Thanks in advance.

Re: Capturing substrings with preg_match_all()

Kimmo Laine wrote:
Quoted text here. Click to load it

Unless next_page.php generates PHP, the script with this include will
only get HTML.

Quoted text here. Click to load it


    if (isset($_GET['foo'])) {
      echo '<?php echo $_GET[\'foo\']; ?>';
    } else {
      echo '<?php echo \'Not available\'; ?>';

File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot

Site Timeline