Depending on your version of php, you can use...
/\d+GB Hard Drive/
Hi I've got a string of text like:
"A generous 4GB Memory ensures multitasking isn't a problem while the 500GB Hard Drive provides you with vast amounts of storage space for all your multimedia files..."
And I want to extract the hard drive size with preg_match in php.
if(preg_match("/( [0-9]GB)(.+?)GB Hard Drive/", $description,$hdd)) {
print_r($hdd);
}
I can't figure out how to do it, despite reading multuple regexp tutorials. Anyone know how to code this?
Thanks
Tom
Depending on your version of php, you can use...
/\d+GB Hard Drive/
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks