The # are apparently a regex begin and end markers (googled), first I've seen them. I think they're OK. Regex start ^ also good. Single quotes OK, I forgot to check the coding style on that.

I'm not sure I'm versed enough in regex to quickly understand what the tailing group capture (?=//) wants to do. Can you explain?