Jump to content

PhillFernandes

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

PhillFernandes's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I think I have this right but I would like someone to verify that. function storageAmmount() { system('stat /web/'.$user."/ | grep Size: > /web/".$user."/log/storage"); $storage = fopen('/web/'.$user.'/log/storage'); $storage = str_replace('Size:', " ", $storage); $storage = preg_replace('Blocks:(((A-Z), a-z), 1-9)','',$storage) } This is the line in the text file: I am trying to get just the numeric value the proceeds "Size: ", the word Size: and everything else is usless to me. I am mainly looking at the preg_replace. Is it just me or is regex a tad bit confusing? Any thoughts. Thanks for any help in advance. Cheers!, Phill
×
×
  • 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.