我需要在PHP中使用REGEXP来搜索和替换"??" 在约会

Gar*_*ier 0 php regex string

作为一个例子,我的日期数据写为1992.09.02.如果日期不可用,你最终会得到1992.09.或1992年.??.?? 或者其他.??.?? ?? ?? 如果没有日期.

我需要改变".??" 到"",即没什么.

这是我的尝试,但我没有到达任何地方.

$text="^[1-9]. [\.\?\?] ";
str_replace("\.\?\?", " ", "$text");
Run Code Online (Sandbox Code Playgroud)

GSt*_*Sto 5

$text = str_replace(".??","",$text);
Run Code Online (Sandbox Code Playgroud)