# Bin Hex Oct Dec Conversion

Bin/Hex/Oct/Dec Conversion

Example:

Convert a text from binary to hex.

Replace settings:

1) Replace Unit=Word

2) Search for pattern=.*

3) Replace with pattern=calc(oct('0b'.\$match),'x')

4) If=\$match=~/^[01]+\$/

Other conversions:

2->8: calc(oct('0b'.\$match),'o')

2->10: calc(oct('0b'.\$match),'d')

2->16: calc(oct('0b'.\$match),'x')

8->2: calc(oct('0'.\$match),'b')

8->10: calc(oct('0'.\$match),'d')

8->16: calc(oct('0'.\$match),'x')

10->2: calc(\$match,'b')

10->8: calc(\$match,'o')

10->16:calc(\$match,'x')

16->2: calc(oct('0x'.\$match),'b')

16->8: calc(oct('0x'.\$match),'o')

16->10:calc(oct('0x'.\$match),'d')

Notes:

For batch replace files, please refer to Replace Pioneer help manual.

', '>',\$fString); \$fString = str_replace( '<', '<',\$fString); \$fString = str_replace( chr(32), ' ',\$fString); \$fString = str_replace( chr(13), ' ',\$fString); \$fString = str_replace( chr(10) & chr(10), '
',\$fString); \$fString = str_replace( chr(10), '
',\$fString); } return \$fString; } function show_pages(\$page,\$MaxPage,\$colname_rs) { echo " Page:\$page/\$MaxPage    "; if (\$MaxPage<=1) {return;} echo "Goto: "; if (\$page>1) { \$prevPage=\$page-1; echo "  "; } for(\$p=\$page-10;\$p<=\$page-1;\$p++) { if (\$p>0) { echo "\$p ";} } echo "\$page "; for(\$p=\$page+1;\$p<=\$page+10;\$p++) { if (\$p<=\$MaxPage) { echo "\$p ";} } if (\$page<\$MaxPage) { \$nextPage=\$page+1; echo "  "; } echo ""; } //\$dbid = mysql_connect(\$hostname,\$dbuser,\$dbpasswd) or die(""); //mysql ServerNorthWind //\$db = mysql_select_db("mindp9_test",\$dbid) or die(""); //SQL \$query = "SELECT * FROM ("; for(\$i=0;\$i \$MaxPage) \$page=\$maxPage; ?>

Other Examples of "" " .HtmlEncode(\$arr[2]).""; } //if }//for echo "
"; }//if ?> Search all "" examples