regular expressions

    Date: 02/25/07 (PHP Community)    Keywords: no keywords

    i'm trying to pass a string of who-knows-what to the preg_replace function and end up with a list of comma separated numbers. and i can't get it to work. the numbers may or may not have decimals, but won't be negative.

    $val = "a,s1,d,ff,12q,12p...3.4.5.6.p7";
    $val = preg_replace('/FOOBLARGH/','',$val);
    echo $val // $val = 1,12,12.34567
    


    would anyone mind helping me out with this?

    Source: http://community.livejournal.com/php/545530.html

« MySql error || Site Search Engine »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home