Ben onlara bir yıl içeren metin cümleler ayıklamak bir düzenli ifade gerekiyor.
Örnek metin:
Next, in 1988 the Bradys were back again for a holiday celebration, "A Very Brady Christmas". Susan Olsen (Cindy) would be missing from this reunion, Jennifer Runyon took her place. This was a two hour movie in which the Bradys got together to celebrate Christmas, introducing the world to the spouses and children of the Brady kids. This movie was the highest rated TV-movie of 1988.
Örneğin metin değişkeni $ string olsaydı, ben dönmek gerekiyor:
- $sentenceWithYear[0] = Next, in 1988 the Bradys were back again for a holiday celebration, "A Very Brady Christmas".
- $sentenceWithYear[1] = This movie was the highest rated TV-movie of 1988.
Bu regex aracılığıyla yıl tutmak mümkün ise, ben cümle içinde yıl kullanmak ve sonunda böyle bir veritabanına cümle eklemek istiyorum:
Tablo_ismi (yıl, cümle) VALUES ('$ yıl', '$ sentenceWithYear [x]') INSERT INTO