Jump to content

How do i..


pickachu

Recommended Posts

What is "a whole html" ?

 

And we need more information about the format of the "generated strings".... do they have a specific length, consist only of specific characters, start and end in a specific manner or are they within a specific tag?

 

 

Link to comment
Share on other sites

Oh sorry, the HTML tag did not show up on my original post..

 

Inside a whole html tag, contains all sorts of html tags but the string that i want to store inside a variable is inside

 

<br><br>Generated String: 76&67&5&5&9&<br><br>Shift Factor: 15<br><br>
[code]

And note, That [code]<br><br>

is use only on that line.. [/code][/code]

Link to comment
Share on other sites

~<br><br>Generated String: ([^<]+)<br><br>Shift Factor: (\d*)<br><br>~

 

Matches what you want in the first 2 subgroups

 

<?php
$hay = '<br><br>Generated String: 76&67&5&5&9&<br><br>Shift Factor: 15<br><br>
[.c.ode]

And note, That [.co.de]<br><br>';
preg_match_all('~<br><br>Generated String: ([^<]+)<br><br>Shift Factor: (\d*)<br><br>~', $hay, $out);
$a = $out[1][0];
$b = $out[2][0];
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.