我的字符串是
Personal Details :-Name: ABHISHEK DAS-Sex : Male-Date of Birth : 21st July 1986.-Marital status: Married-Nationality: Indian-Languages I can speak: Hindi, English, Bengali. -Declaration:-I here by declare that all the details furnished above are true to the best of my knowledge.-Date:9th November 2017 Abhishek Das----
我想从上面的字符串中获取生日:1986年7月21日
答案 0 :(得分:1)
$str="
Personal Details :-Name: ABHISHEK DAS-Sex : Male-Date of Birth : 21st July 1986.-Marital status: Married-Nationality: Indian-Languages I can speak: Hindi, English, Bengali. -Declaration:-I here by declare that all the details furnished above are true to the best of my knowledge.-Date:9th November 2017 Abhishek Das----";
$date = trim(explode(".-",explode(":",$str)[4])[0]);