Most people got the correct answer, which was WTF. The other correct answer was xxyxfooy which nobody got.https://twitter.com/erikcorry/status/1150822100749492226 …
-
-
I'll give it a go: first match: the lookbehind is x, so we replace foo with x. Now the string is xxy. Second match, the lookbehind from the original string is xfooy. So xxyxfooy.
-
Yes. Another way to say it is that because of the look behind each “foo” is replaced by whatever is to the left of it. So the first foo is replaced by x and the second foo is replaced by xfooy.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.