Jump to content

[SOLVED] regex question


dtdetu

Recommended Posts

PHP Code Example:
<?php
$sourcestring="your source string";
preg_match_all('/\((\d+):\d+\)/',$sourcestring,$matches);
echo "<pre>".print_r($matches,true);
?>

$matches Array:
(
    [0] => Array
        (
            [0] => (10:1)
        )

    [1] => Array
        (
            [0] => 10
        )

)

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.