How might I match a string for Font Lock fontification while ignoring comments within that string? e.g.
(setq str-regexp "^foobar$"
comment-regexp "/\\*[^*]*\\*/")
Now how might I return match data to fontify the string "foobar" in the following buffer text?
foo/*comment*/bar
fo/*comment*/obar
fooba/*comment*/r
I can easily strip the comments from a buffer substring and then match a regular expression within that substring, but I don't know how this could then translate back to buffer markers/points suitable for Font Lock. Any ideas?