Here I try to make an editor that replace a string in particular position of the file.
Like
$file = FFFFFFF
$string = 'FFFF';
$replace = '0000';
$position = '2';
so what I want is some kind of function
that search for $string and replace with $replace but only if the string's 1st(or nore than one) letter are in $position of the $file....
so, after replace, it will be
F0000FF
any one show me how to do that? because I don't know how to use any expression to use the $position var
I want to know this because in HEX level search and replace might come out a lot result, so to disable that from happenning, there are a offset. Offset is where the data's 1st 2 HEX values are places. For instance, in a huge text, the 1st string are 2 HEX values, and it's offset is 1, so the 2nd string's offset will be 2... just like that~