Find & Replace, Queiry

IS there a function in the find and replace with a wildcard?? for example

i want to put some DEFAULT layout tags around these so i have something that looks like this…

AB30 LAURENCEKIRK ABERDEEN

which will format to be…

<AB30 name=“AB30” photo=“IMAGEAREA”>
LAURENCEKIRK ABERDEEN
</AB30>

but some dont have the TOWN name so for example…

AB11 ABERDEEN

will format to be…

<AB11 name=“AB11” photo=“IMAGEAREA”>
ABERDEEN
</AB11>

is there anyway of adding this because i have over 3000 lines of code :frowning: