07-02-2005, 13:23
|
|
|
חבר מתאריך: 01.11.04
הודעות: 109
|
|
עזרה בpreg_replace.
שלום לכולם, אני צריך עזרה, שוב, בPreg_Replace.
קראתי על ביוטיים רגולרים, וקצת עם ידע קודם.
אבל לא הצלחתי בכל זאת.
יש לי במשתנה את הביטוי הבא:
somefile.someext
בלי רווחים, בלי תווים לבנים, בלי כלום.
אני רוצה להפוך את זה ל:
FullDate.someext
( כמובן שFullDate יהיה התאריך המלא + שעה, אני יודע לעשות. )
ניסתי לכתוב כך:
קוד:
$date = date("YmdHis");
$uploadfile = preg_replace("/(!S+)/\./(!S+)/","$date\.//2",$uploadfile);
אבל זה לא עובד, אז בבקשה עזרה.
_____________________________________
Your signature did not follow Fresh's signatures policy, therefore it was automatically erased. Please see the E-Mail which has been sent to you, to learn how to fix this.
|