Keep getting this code reparted again and again?

It seems that the permalinks structure has an issue.
Please follow below steps to fix it.

Step 1: if possible, back up your WP installation folder. Step 2:
Temporary disable all the plugins (important step)

step 3: in the WordPress admin dashboard, go to Settings -> Permalinks

step 4: remember or note down somewhere what you have in the custom
permalinks

step 5: temporarily enable (switch to) the default permalink:

step 6: verify the website is working now (not everything, because the
plugins are disabled, but the preg_match error should be gone)

step 7: switch back to the custom permalinks setting you had at step 3

step 8: enable back all the plugins

The error will be gone.

Reference link