hi all
i need to select the first fifteen words of an article stored in a mysql database. so i have the basic idea laid out but the exact syntax seems a bit confusing. i have a book here on regular expressions and i think it has confused more than before.
so here is basicaly what i want to do
select the first word what ever it may be, so /S+ i think should match 1 or more non white space charters and then a /s then repete that fifteen times like so
/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s
now i know that there has to be a better way to do that so if anyone knows please relive my ignorance
eric
i need to select the first fifteen words of an article stored in a mysql database. so i have the basic idea laid out but the exact syntax seems a bit confusing. i have a book here on regular expressions and i think it has confused more than before.
so here is basicaly what i want to do
select the first word what ever it may be, so /S+ i think should match 1 or more non white space charters and then a /s then repete that fifteen times like so
/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s/S+/s
now i know that there has to be a better way to do that so if anyone knows please relive my ignorance
eric
Comment