Get text from html

I can not get a text from a html
My Html:

<html>
    <head>
        <title>Page Teste</title>
    </head>
    <body>
        <input type="hidden" name="confirm" value="SimpleConfirmValue"/>
    </body>
<html>

in php i use

        $Confrim0 = @explode('<input type="hidden" name="confirm" value="', $PegarConteudo);
        $Confrim1 = @explode('"/>',$PrimeiraPart[1]);
        $ConfrimI = $Confrim1[0];

ConfrimI Return = SimpleConfirmValue

And Web JavaScript :

        var Confrim0 = HTML.split('<input type="hidden" name="confirm" value="');
        var Confrim1= Confrim0[1].split('"/>');
        var ConfrimI = Confrim1[0];

ConfrimI Return: SimpleConfirmValue

in Unity3D I try to do this the same way but does not work

    var ConfrimP0 : String[];
    var ConfrimP1 : String[];
    var ConfrimI : String;

    ConfrimP0 = HTML.Split('<input type="hidden" name="confirm" value="'[0]);
    ConfrimP1= ConfrimP0[1].Split('"/>'[0]);
    ConfrimI = ConfrimP1[0];

ConfrimI Return : html>

why does this happen?

In your Split functions, you’re using the char version of the function. Your first split is splitting it by ‘<’, and your second, with a quotation mark.

Try the string variant of the function instead?

Sidenote: Your HTML is malformed. Last tag should be

string variant ?
I do not quite understand

I did now only for testing