I need to remove ordinals via regex, but my regex skills are quite lacking. The following locates the ordinals, but includes the digit just prior in the return value. I need
I came across this question, because I needed to replace ordinal numbers with dot, i. e. 1., 2., 4. etc.
1.
2.
4.
Here is the solution for this problem (in PHP):
$entry = preg_replace('/^\d+\. /', '', $entry);
Test: https://regex101.com/r/xLB6Ov/1