Jump to content

How do i..


pickachu

Recommended Posts

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
https://forums.phpfreaks.com/topic/85198-how-do-i/#findComment-435157
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
https://forums.phpfreaks.com/topic/85198-how-do-i/#findComment-435447
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.