The search and replace functions in GeditDocument are now deprecated:
https://developer.gnome.org/gedit/unstable/gedit-gedit-document.html
You are encouraged to use the new API in GtkSourceView:
https://developer.gnome.org/gtksourceview/unstable/GtkSourceSearchContext.html
Note that regular _expression_ searches (and replaces!) is now integrated
directly in gedit.