[Question]
  [
From the subreddit [r/SpeedOfLobsters](https://www.reddit.com/r/SpeedOfLobsters/):
> 
> Edit the text of an image to create a new phrase
> 
> 
> 
This meme format/style is pretty self-explanatory. Simply have a browse through the subreddit if you need more examples. However, when coming up with ideas, it can be quite difficult to decide exactly which letters to keep and which to blank out to create my intended joke.
You are to take a sentence of space separated "words" (i.e. non-empty alphabetical strings) and a target "word" (still a non-empty alphabetical string) and "blank out" characters from the sentence in order to make the target word. For example:
```
"I do not control the speed at which lobsters die", "code" -> "*********co**************d***************e******"
```
Note that the order of the target word is maintained, so `**do*****c*********e****************************` is not an acceptable output. Earlier occurrences take priority, so `"testcase string", "tas"` should be `t****as********` not `t****a***s******`
You may input and output in any [convenient method](https://codegolf.meta.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods). You may use either uppercase or lowercase, so long as it is consistent across all inputs. You may use any character that will not appear in the input (i.e any non-alphabetic character, or characters of the opposite case to the input) to "blank out" characters.
The target word is guaranteed to be fully contained in the sentence (so `"abcdef", "xyz"` will never be an input) and will always be shorter than the sentence. The sentence will contain a minimum of two words (and therefore one space), each of which will be a minimum of 1 character long.
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so the shortest code in bytes wins.
## Test cases
```
sentence
target
output
I do not control the speed at which lobsters die
code
*********co**************d***************e******
testcase string
tas
t****as********
uglhwagp qvyntzmf
ulhwagpqvyntzmf
u*lhwagp*qvyntzmf
qrkacxx wwfja jsyjdffa vwfgxf
qcfvf
q***c*****f************v*f***
z wzsgovhh jopw igcx muxj xmmisxdn t lmb
gcujxlb
*****g************c***u*j*x**********l*b
kxf jgmzejypb ya
e
********e*******
fe oxyk y
ex
*e**x****
o wr fmik
owrfmik
o*wr*fmik
pgezt yozcyqq drxt gcvaj hx l ix xemimmox
e
**e**************************************
kqclk b hkgtrh
k
k*************
sia prcrdfckg otqwvdv wzdqxvqb h xclxmaj xjdwt lzfw
crwqqhxl
******cr*********w*******q**q**h*x*l***************
teatsase
tas
t*a*s***
```
Thanks to [Lyxal](https://codegolf.stackexchange.com/users/78850/lyxal) for helping me adapt the original idea of this into this version
  
[Answer]
# [convey](http://xn--wxa.land/convey/), 59 47 bytes
```
{
?;\,&:1<
v^<^ ,<$1
"=>^}"@"}
>">>#="
'*'>:<=0
```
[Try it online!](https://xn--wxa.land/convey/run.html#eyJjIjoieyBcbj87XFwsJjoxPFxudl48XiAsPCQxXG5cIj0+Xn1cIkBcIn1cbj5cIj4+Iz1cIlxuJyonPjo8PTAiLCJ2IjoxLCJpIjoiJ3Rhcydcbid0ZXN0Y2FzZSBzdHJpbmcnIn0=)
Run with `tas` and `tsase` (output is `t*as*`):
[![run](https://i.stack.imgur.com/04uzU.gif)](https://i.stack.imgur.com/04uzU.gif)
Split the input into two streams `?;\‚Ä¶ ^<`, then always take one letter `:1`, compare it with the head `=`, and either `@` put the letter back into the queue `,` and output a `'*'$‚Ä¶}`, or output the letter `}` and take the next letter `$1`.
After the queue is empty, to output the rest of the string, we push some dummy 1 values into the queue (by comparing the input with itself).
[Answer]
# JavaScript (ES6), 35 bytes
Expects `(haystack)(needle)`, where `haystack` is a list of characters and `needle` is either a list of characters or a string. Returns a list of characters. The blank-out character is `0`.
```
s=>w=>s.map(c=>c==w[s|=0]?++s&&c:0)
```
[Try it online!](https://tio.run/##bY2xDsIgFAB3v@KFoYU0ks4m1NlvaDog0BaDvIb3Yhf/HRsnB@fL3T3sy5IrceNzRh/qbCqZYTcD6afdpDODM2Yf6W366dp11DTu0qvqMBOmoBMucpaj1lrcwCNkZDgYF0zAawDaQvBgGfY1uhUS3olDIfAxiElJ4Y6nUPqBMcu2Ver0J8yB2Fk6YlxiXr4eW/rV6gc "JavaScript (Node.js) ‚Äì Try It Online")
### Commented
```
s =>             // s[] = sentence as an array of characters
w =>             // w = word
s.map(c =>       // for each character c in s[]:
  c == w[s |= 0] //   we re-use s[] as a pointer into w; it's safe to
                 //   coerce it to a number with a bitwise OR because
                 //   s[] is guaranteed to contain only spaces and letters
  ?              //   if c is equal to w[s]:
    ++s && c     //     increment s and yield c
  :              //   else:
    0            //     yield the blank-out character "0"
)                // end of map()
```
[Answer]
# [Haskell](https://www.haskell.org/), ~~61~~ ~~59~~ 44 bytes
Saved ~~1~~ 16 bytes thanks to [@ovs](https://codegolf.stackexchange.com/users/64121/ovs)!
```
(a:b)%(c:d)|a==c=a:b%d
(_:b)%c='*':b%c
e%_=e
```
[Try it online!](https://tio.run/##PZBBboMwEEX3nOILFQUqeoFIdN8zUBQNtsEkBgMeMEW9O4WgZvn/m5HejCb3UMZsW0zXMolicZXJL2WZyPYcySC@HbXILu@XPYtARbdMbU3XT@yQIc/DL0iLzjKE7Xi0BqwVXK@UBDG8boSGsaVjNTrIRoUpQmGlCosUecjKsSC3b/DYdPUBmdzJptpoT3WPYf7peG2rg05n96qek64h9KMYZSUeNSwPfpYz/CqHZR5KaCzCLC3dsdylZ5i18k@N0Q@DXsy/CrHbVV4ORdBS0@1X9rsa4w0t9Yi/c0rL4uOTojLB@YjtDw "Haskell ‚Äì Try It Online")
[Answer]
# x86-16 machine code, 11 bytes
Binary:
```
00000000: a674 054e 4fb0 2aaa e2f6 c3              .t.NO.*....
```
Listing:
```
        CHAR_LOOP: 
A6          CMPSB               ; compare [DI] and [SI], advance both
74 05       JZ   MATCH          ; if same char, do nothing
4E          DEC  SI             ; back up target word to previous char
4F          DEC  DI             ; back up sentence to previous char
B0 2A       MOV  AL, '*'        ; load overstrike char
AA          STOSB               ; overwrite char with *, advance DI
        MATCH: 
E2 F6       LOOP CHAR_LOOP      ; loop until end of sentence
C3          RET                 ; return to caller
```
Callable function, input sentence string at `[DI]`, length in `CX`, target word string at `[SI]`. Output is modified string at original `[DI]`.
Test using DOS DEBUG:
[![enter image description here](https://i.stack.imgur.com/ZTDuu.png)](https://i.stack.imgur.com/ZTDuu.png)
### Alternate version, 11 bytes
```
B0 2A       MOV  AL, '*'            ; load overstrike char
        CHAR_LOOP:
F3 A6       REPZ CMPSB              ; compare [DI++] and [SI++], repeat if same; CX--
4E          DEC  SI                 ; back up target word to previous char; DI--
4F          DEC  DI                 ; back up sentence to previous char; DI--
AA          STOSB                   ; overwrite char with *; DI++
41          INC  CX                 ; offset CX decrement from LOOP; CX++
E2 F8       LOOP CHAR_LOOP          ; loop until end of sentence
C3          RET                     ; return to caller
```
Saves 1 byte using `REPZ` instead of `JZ`, however it's lost because the loop needs to end when `CX` is `0` and unfortunately there's no `JCXNZ` instruction to do exactly that. Bummer.
[Answer]
# [K (ngn/k)](https://git.sr.ht/%7Engn/k), ~~24~~ 20 bytes
-4 bytes from using `" "` as the blank-out character
```
{y@<>y{y_x,y~:*x}/x}
```
[Try it online!](https://ngn.bitbucket.io/k/#eJxdUtuK2zAQfc9XHNy3EihlKZSklH3tNyxLkXXzTZF1iTVyyH57ZWdzqzAea+bMOePDqN0pv/76nU/5L23zx+4rnb/RebOJu9P8od5on9/Pm/hW/YGwONgIbg/R2wGxkQijlAIsIjUtbzDYOkTpA0Qrq33FrVgCrodbPB3xfIW8hOp90YsyRM5C0Yi+PejCE1lY3guEhWvPBXzUQ5OYHuGmfIizUQV4vKQeM/gftTY73zNOhJRUx9CF3AmlGKakNC1tjqtpjcsvrKLqceppvV6oZqQ5aDs1DTo7JrSaE8yROpAxbSBxQMRg6sKm+bGjob76ox8pF5UjStM9NaC+SPSk0Gkzyy6PNTKr9tvq0WX5ZIySsJR75IKQtMBKne51i+ShTNuXkk3++nXLrqBRyzki25ln5yA8RWg+sQ4NlblaAknTGmPpPousti8/v1SfKr3jQ48aTa+jbxbUotJX2+8vN0xoGUbPvVC817DRpUlMxU7haHKlFcQHMkWUOpGKibNKy4r55FxDw80A7m+Wpc/o1qcQYCiKP26KUbIYyoY9rBZDWK35By8f5sU=)
Shoutout to @chrispsn and @ngn for helping to golf the above!
* `y{...}/x` set up a reduction seeded with `y` (the characters to search for), run over the characters in `x` (the full string). confusingly, within the function itself, `x` and `y` are flipped. this ends up returning a boolean array with `1`s in the positions containing the desired matches and `0`s everywhere else
* `y~:*x` compare the first character to search for (`*x`) to the current character being iterated over (`y`), updating `y` with the result of `0` or `1`. note that as soon as we have matched all the search characters, no more matches will be identified (since a character will never `~` (match) a `0` or `1`)
* `x,` append this result to the list of characters to search for (essentially overloading the reduction to end up returning the desired output)
* `y_` if there was a match, drop the first character (if there wasn't a match, this is a no-op). this allows us to search for the next search character in the next iteration of the reduction
* `y@<>` do an [APL-style expand](https://aplwiki.com/wiki/Expand) with y and the generated boolean array (this fills with `" "`s)
An alternative blank-out value can be implemented by inserting e.g. `"*"^y` at the beginning of the function.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~12~~ ~~11~~ 10 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
v¬¨yQiƒá?√´0?
```
-1 byte by using `0` as filler character instead of `*`.
[Try it online](https://tio.run/##yy9OTMpM/f@/7NCaysDMI@32h1cb2P//X5KaWFKcmJ7KVZJYDAA) or [verify all test cases](https://tio.run/##RZA5jtwwEEWv8qF4grmBYoeOGwOY4i6Jorg0WRQwqZ3PNezYBxj7JL5Im72MnRXeX4D6PrHJyktp44A/X98wjO1LupT3H@2z/f1t/PX9eby8vr7/HC@n0/AJwmPzGdxvOfoV2UikXUoBllGN5Qarn1KWMUFYOTwN3As5vDzhNGSZMmepB3K0m@5aZukunfVqKtM7QmlbPpzq4vmO/pGbMcSFcSLUqmaGObVZKMVQqtJ0DQWuysN6oB5J@2IMZr9XWM0J7kwzyDmbSGzIWN3UU5qfZ1qne24hhVm7Q85tn9BY1x8PKAlPbUG7IrozjxqhnF068zXerpuwa3lkNH/wFgJEpAzNC5thCCssgaSzznn6378Evi6YYBado@n8UZUswx55FIovGj6HWkTp34lAJXQ7iK/kejXNovafDlWvw8cagqH1Y3yWUx//Y/WXvw).
**Explanation:**
```
v       # Loop over the characters `y` of the (implicit) input-sentence:
 ¬¨      #  Get the first character without popping the string
        #  (which uses the implicit input-target the first iteration)
  yQi   #  If this first character is equal to the current character `y`:
     ƒá  #   Extract the head of the target-string; pop and push the remainder-string and
        #   first character separated to the stack
      ? #   Pop and print this first character
    √´   #  Else:
     0? #   Print 0 instead
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~52~~ 44 bytes
Saved 8 bytes thanks to the man himself [Arnauld](https://codegolf.stackexchange.com/users/58563/arnauld)!!!
```
f(s,t)char*s,*t;{for(;*s++=*s-*t?42:*t++;);}
```
[Try it online!](https://tio.run/##hVTbjpswFHzfrziKVAlMVm237UNLt32o@hWbVUV8426wHWxY5dtT20Auu5VqJbHPMGc8DDj4nmN8OrFIbXWM80witUU6fWFCRilSSfKI1D3SPz8/fEM6SdI4PZ6KVkOTFW0U373cgRuhDzRV@o96eoZHeNkUQAS0QgMWrZaiBp1TUB2lBDINJi9wDrXYK02lAlLQzRY2XgBnyvG0LFruoQOvc5PxDvphbPXUMA/2ssqwtWAMKzMo1VgSxjIYDOM2ECYwk@JiyHMoRWeg4NhCc7Al2KYplCUtaKibvedWlkHJm4mWY7eHMfMYoyDsWMHoCwFGAmuKyhcdp5OGUUx47Hsg0mrgeMhKyC3UUFiwtCmaRtgg3eO6gj3kFdcy94gqMugkloThioPQvRnI4MyS3g69I4LFtW2cnC2JcRYnZuZgMq1cMJtj@jpvveSNBZkzzFTIbY7tJjXMhrDg@FDaOtx8aKHBrDByvcmAhhWWpu9zW6/KN/tT21GsKVkcoHVggW4GuS0Rnaeg6ReZWq8E52i2jm68e9lAYddKQyg9IZT8@pqnH1CJ7AWq0f7MvfiY@11h10IgI9EaxoX3nxFCe4MsZuQZNMvch0/udq3/IaRRhnwst4njnOKKyiXwnf39sLNff7nvF99zVX9a@9wxhsif16Il1Lq2D@my/A6qmKhg0foY4/cLgM5ICkkS2DHMB/1iRTmt5cAHxnN6Q4D9gbEnd45r2kYqhgQ@XjEcjrsx8pwtqDh9pa1Xbf1Gm81N@k0PdT3nF/J1lw@AC0Ecx2/ddMvWNIZHH8mZ2Ln/Hc2izW7zTu1cpvMM9z/WlftpHa62oLcwi6wPxW/wvPg63h1PfwE "C (gcc) ‚Äì Try It Online")
Function takes two input strings and return the meme-formatted string in the first parameter.
### Explanation
```
f(s,t)char*s,*t;{       // function inputs two strings
   for(;                // loop    
        *s              // until end of string s
          ++            // bumping s each loop
            =           // set character in s to...
             *s-*t?     // depending on whether it equals character in t
                   42:  // a '* if not equal
                   *t++ // or character in t and bump t if equal
        ;); 
}
```
[Answer]
# [Python 3.10.0a4](https://github.com/python/cpython/tree/v3.10.0a4)1, 56 bytes
```
f=lambda s,t:s and('*'+s)[x:=s[0]==t[:1]]+f(s[1:],t[x:])
```
[Try it online!](https://tio.run/##XVI7jtswEO19itfJzqrYRZpAgA@QMwgqKP70oyiRY3GkyzuUnWwRVsT7gfOGy06dn3/@WsLzae6TcK0SiCVVEWJW1@JH8RFv9ZWre6w/m/ud6uqruTUf5hrrr6opqeaquT1JR4q4oy5@Q3nMniD9TMFPoE4jLlorCELqetlh8m0kHSJUr4uykF7poinr4kyRImY9hX62mSIRX8zDTl0SdsG67TMdzmTu8Ya@kVO3hlFIZqRkBoEh7oMyRmBLxvLpWaXZ3soD6YjWb12HwS8JvZUM9@AB7FwfWc0gTK7NJisfA0/tyzaywWDdoYd9abGLTL/fbjQ87yP2E@EX5JECjOvHDPkUXrcTX6w@CLs/5L6uUIEJVm5iQMeY0DNYu945z9/h4yqnES260VLoMvwOir3AEmRQRo4Wnta0qS3PpVbe1qwGy4ldDuZBpTzNYdJZd0jr2vH0t3JBMVf@r@vLxfiAqGfSs9QlSASrCX1u41xxdUE@S94OXfMX@E92uz3/AA "Python 3.8 (pre-release) ‚Äì Try It Online")
Python 3.10 [allows unparenthesized assignment expressions in indexes](https://docs.python.org/3.10/whatsnew/3.10.html#other-language-changes), which saves 2 bytes over 3.8 here, which is the newest version on TIO.
1This is the version I tested locally, this will probably work in future versions as well.
[Answer]
# [APL(Dyalog Unicode)](https://dyalog.com), ~~27 25~~ 20 bytes [SBCS](https://github.com/abrudz/SBCS)
```
({w‚Üì‚ç®‚Üê‚çµ=‚äÉw,0}¬®‚çû)\w‚Üê‚çû
```
[Try it on APLgolf!](https://razetime.github.io/APLgolf/?h=AwA&c=06guf9Q2@VHvikdtEx71brV91NVcrmNQe2jFo955mjHlYNF5AA&f=AwA&i=RZBbjuUgDET/WUVtp5dBeL9CAF9wsvomt6WZH8s@qrLsskJVbcQPdMVZCaqe1GsGeYNxGaMhCcsH5ZHrMcj0AR2MEFaQHILMICXH1lIPp3vxJ/sl3dXmfdJT9uz@AP6RLWrKzl17kooZa9koEccdtbUSc1nHX5lTn8j5EA/WM1yd3iPWayE4xSgfjuBSwmB9gpDL8XqMSGwRXXlMvK8Dt/xSFtag8p1wv3Nd3ZaQRMXq@HZf6@XMQ7jro@7WoDsTnJoywjMyAoNNCaVUfuVJpKZywgGfHHX/MtVXa56zGEHi6qprq5JDpbamnvsN3Xi27QCrzGVv5qjXPv6x63@oksYO9Rc&r=tio&l=apl-dyalog&m=tradfn&n=f)
A tradfn submission which takes the two values from STDIN.
Inspired by coltim's K answer.
Uses space as the blotting character.
-2 and -5 bytes from Ad√°m!
The expand operation `\` uses a bitmask to insert spaces between the elements of the input.
`1 0 0 1 0 0/'hi' ‚Üí 'h i '`¬†
## Explanation
```
({w‚Üì‚ç®‚Üê‚çµ=‚äÉw,0}¬®‚çû)\w‚Üê‚çû
                 w‚Üê‚çû store target word in w
                \    expand using the following bitmask:
 {          }¬®‚çû      for each character of the source word:
      ‚çµ=‚äÉw,0          is the character equal to the first one in w?
                      return that
  w‚Üì‚ç®‚Üê                then drop that many characters from w (0 or 1)
```
[Answer]
# [Ruby](https://www.ruby-lang.org/) `-pl`, ~~38~~ 37 bytes
```
->t{gsub(/./){$&==t[0]?$&+t[0]*=0:0}}
```
[Try it online!](https://tio.run/##jVPbbtswDH33VxBdVnQr0mqvA7w97xvSYLB180W2rIst2kF@fZkvaZZ06YUQRFI8pA5BybZpfxDxYf3D76Rr07vHh8cvu9VtHPsN2f5c3d5P@mtMvpP9/iA2EcDnMO0AVDM@Gz5xs25VFhLZmK6v/VCJ@cxQ0S2WpG2BKp3tJY/jrHSwosrLs8BiUxuMyVCNznazelh/20bbaPUb7mO4eao/7UYzjk9sXgh5FqrJhbBLl/BFXavhp0DinpHXIC1ZeiYXTb8QM9GYS4jzm7vZfZW8PMdO6S0pCP47UiR9q3H@BuspiK8FNQmWnAbyX3VOPiTXkst3Ecdm7QkUjtrMKxtZq3cvOj6W/VN9c/gFTEOt/fhYa2@1Ap9xcA3nDBIPIctpBkqnznPrgOU88tx5mrgR5G1ey6iVy4DhNGBjy4QiQgiiSKBwfcGESKALQqKIBgiDk7rLMih0EyCXFKFqsQCsqtwhq8GDqtKoRAGFrAZe9E0KfRIJDhr7EvpIQ7AwT6CRfPDQ64H2xgCz6Mdv1CUFZAgKcgTkVV5VGqPSUFVCClkpvc0ilyfQWGqZoKUE7U3oWDdSYwY7M6IAqcJqLIQFCyOhQYQ/uvG5rt1h3ai/ "Ruby ‚Äì Try It Online")
Takes the sentence from STDIN and the target word as the lambda argument. Uses `0` as the blank-out character, an idea borrowed from @Arnauld's [JavaScript answer](https://codegolf.stackexchange.com/a/217697/92901), which saves a byte over using `*`.
For each character in the sentence:
* If it is the same as the first character of the target word, retain it. Then remove the first character of the target word (`t[0]*=0` is a slightly obfuscated equivalent to `t[0]=''`).
* Otherwise, replace it with `0`.
[Answer]
# [R](https://www.r-project.org/), ~~102~~ 98 bytes
```
function(s,w,`[`=substring){for(i in 1:nchar(s))`if`(s[i,i]!=w[1,1],substr(s,i,i)<-"*",w<-w[2]);s}
```
[Try it online!](https://tio.run/##VY5BbsMgEEX3PcWUFVRk4S6T@AA5g2XJFGMzkgsuMy5Kqp7dRU1iJdv/338zaZ3iB7FL9ToswTLGIEln3TVdTUtpEoZR/QwxSQQMUO2D9SZJUqrDoZPUoMb2tc5NpatWXyfFUFJ13Ik3ofNxl5v3Vh3o935LihP0EUJksDFwihOwd0Czcz0YhuzRerjBBD06oYWNvRPqZVOwI7aGyuz/x0KwoUdgGSefzTjD1/c58OVzKMhyjbbkyWeYim8TrX8 "R ‚Äì Try It Online")
```
function(s,w,            # s=sentence, w=word
  `[`=substring)         # `[` = alias to substring function
  {for(i in 1:nchar(s))  # loop over all the indexes of characters in s
    `if`(s[i,i]!=w[1,1], # if it isn't the same as the first character in w
    substr(s,i,i)<-"*",  # change it to a '*'
    w<-w[2]);            # otherwise leave it and remove the first character in w
 s                       # finally, return whatever's left in s
```
---
Or, with vectors of characters (instead of strings) as input & output (thanks to user for the suggestion):
# [R](https://www.r-project.org/), 75 bytes
```
function(s,w)sapply(s,function(l)`if`(length(w)&l==w[1],{w<<-w[-1];l},'*'))
```
[Try it online!](https://tio.run/##XZDBasMwEETv/orFgVoqziHXNPqAfkMIRJXXtkDRCu26IpR8uyOKW2hvyywzb5i8BvpgwWzWcYlOPEXFfdFsUwr3ev6qQV/9eFUB4ySzKvolGFPOh0v/VU6nfTnvD5e38Oi7107rdQcTRsxWED7RCWUGGsHNNltXYQyWwce0yLFhg0GxZE7Bi2rfYSCIJOAoSqYAMiNwQhzACpTZuxm2ygyDx7ZvW62b8jfF0fDz2cFI@Va9tEgFwpjptpX610kIaoKPE6hqAbR8h4x2qIo@Ns6K2sDfC/WMyXSdbtYn "R ‚Äì Try It Online")
[Answer]
# [Perl 5](https://www.perl.org/) `-plF`, 31 bytes
```
$_=<>;s/./$&ne$F[0]||shift@F/ge
```
[Try it online!](https://tio.run/##BcE7CkIxEAXQ3lXcIthpbKz8YBV4a3iIaDKaQMiEzIBN1u54TqdRj2bucTlfT@L33m0bubAe7nNKLm@9Bf8hs8iJNgsSo7EictPBFZoJ0okSnopvLjGj8kuUhiAV@nHXwk1s12v4Aw "Perl 5 ‚Äì Try It Online")
Input is on two lines. The first line is the target word. The second line is the sentence. Uses `1` as the blanking character.
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 9 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
¬Æ¬•V√é?Vj:Q
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=rqVWzj9WajpR&input=IkkgZG8gbm90IGNvbnRyb2wgdGhlIHNwZWVkIGF0IHdoaWNoIGxvYnN0ZXJzIGRpZSIKWydjJywnbycsJ2QnLCdlJ10)
```
input: 
 > sentence as a string
 > target as a char array
output blanked out with "
¬Æ          - for each char in sentence:
 ¬•V√é?      -  == to first element in target?
     Vj    - returns first element and remove it from array
       :Q  - character "
```
[Answer]
# [k9](https://shakti.sh/) L2021.01.29, 31 bytes
```
{(y,$0)(-1{*(x<)#y}\(=x)y)?!#x}
```
`(=x)y` get indices in sentence for each letter in target
`-1{*(x<)#y}\[target indices]` get each target letter's first index in the sentence that's greater than the last target index we took (ie always looking ahead)
`[first indices]?!#x` get position of each sentence index in the 'first target indices' list, defaulting to the list's length if not found
`(y,$0)[index list]` index into target word with 'blank char' suffix.
EDIT: assuming we want `*` as fill, we can use [coltim's awesome ngn/k answer](https://codegolf.stackexchange.com/questions/217690/speed-of-lobsters/218688#218688) to get to 24 bytes:
```
{`c"*"|x*y{y_x,y~:*x}/x}
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 19 bytes
```
‚âî‚™™‚Æå‚Å∫Ôº≥¬∂¬πŒ∏‚≠ÜÔº≥‚àß‚ÅºŒπ¬ßŒ∏¬±¬π‚äüŒ∏
```
[Try it online!](https://tio.run/##XU67CsMwENv7FUemM6RD5kwZOmRoCc3axbWP2GD8vKT9e9elWwchCQkhZWRWQbpap1Ls5nGNzjLe6aBcCBe3F5x93HnlbP2Goofu4TvReGhIYjwtLWD85VcZ/@uT13hJu3QFbXM8e01vTD3caJNMOIjv2BIipqbEWKsKmk4z6AA@MKjgOQcHbAhKJNIgGV7GKgMuPAu3n6At1fPhPg "Charcoal ‚Äì Try It Online") Link is to verbose version of code. Takes input in the order target, string. Output uses `0` as filler (+1 byte to use an arbitrary filler character). Explanation:
```
‚âî‚™™‚Æå‚Å∫Ôº≥¬∂¬πŒ∏
```
Append a newline to the input target, reverse it, and split it into characters.
```
‚≠ÜÔº≥‚àß‚ÅºŒπ¬ßŒ∏¬±¬π‚äüŒ∏
```
Loop over the input string, replacing each character with `0`, unless the character matches the last element of the above list, in which case pop that element instead.
[Answer]
# [Racket](https://racket-lang.org/), 140 bytes
```
(define(f s t[a'()])(if(null? s)(reverse a)(if(char=?(car s)(if(null? t)#\*(car t)))(f(cdr s)(cdr t)(cons(car s)a))(f(cdr s)t(cons #\*a)))))
```
[Try it online!](https://tio.run/##bVNLcpwwEN37FK/GC4tU@Qix1zmD44VGfxAIpB4kuLyjmUlStrA2gvcpuvvRkYtB0cej55NBvL8wqbSbFNNIoDf@xLr3jjnNpov3r0gdi2pVMSnwGywsjz9fmeDxyv3XUff4@8cNpa7rWNXJm@B6Ub3ClP56@CeabgSqtaL1fDAdIthbwhM7/YIMmAKhaigGD7IKaVZKghOydcLCh3OiWh2kU6cHfDonUokEr3Unim4yDXsx3mZuZizrNtE@6oZf4sBFKchZ9xx92nqpNceatSmtdkfekwmrtejDnOGMKBgvpUcZR5eKnEDw47mxDUWjN@Ou@m0@Y@MNrRVC2QZsJ3wlAnKEHt3QGGajdsIWdrEtC2QsBCNW3sMWeLiCokY3jqG0dSzCDzjDDoaibcjkOOYootRiMAi05FWutV@5lHWpHhThy1g/UnqZa5e7zoccOKWaw6l7/0e80TVfEeQhM56@IjWoe07fx1RzEno9gEZc@uLPLawOQGlmW4eb43G031gPChHzstjiW/zaUt0oPDDp0uz55icw7xI9v9x/TNTNY/fH55crUfeiAei@HH8A "Racket ‚Äì Try It Online")
I know, this is super long and silly.
[Answer]
# Oracle SQL, 225 bytes
Its not a golfing language, but ...
```
WITH r(s,w,a,b,c,l)AS(SELECT s,w,1,1,'',LENGTH(s) FROM t UNION ALL SELECT s,w,a+1,DECODE(SUBSTR(s,a,1),SUBSTR(w,b,1),b+1,b),c||DECODE(SUBSTR(s,a,1),SUBSTR(w,b,1),SUBSTR(w,b,1),0),l FROM r WHERE a<=l)SELECT c FROM r WHERE a>l
```
Which assumes a table `t` with columns `s` (sentence) and `w` (word) and uses `0` as the masking character.
A neatly formatted version (which also outputs the sentence and word) is:
```
WITH r(sentence,word,sentence_pos,word_pos,output,len)AS(
  SELECT s,
         w,
         1,
         1,
         '',
         LENGTH(s)
  FROM t
  UNION ALL
  SELECT sentence,
         word,
         sentence_pos+1,
         DECODE(
           SUBSTR(sentence,sentence_pos,1),
           SUBSTR(word,word_pos,1),
           word_pos+1,
           word_pos
         ),
         output||DECODE(
           SUBSTR(sentence,sentence_pos,1),
           SUBSTR(word,word_pos,1),
           SUBSTR(word,word_pos,1),
           0
         ),
         len
  FROM   r
  WHERE  sentence_pos<=len
)
SELECT sentence,
       word,
       output
FROM   r
WHERE  sentence_pos>len
```
Which, for the sample data:
```
CREATE TABLE t(s,w) AS
SELECT 'I do not control the speed at which lobsters die', 'code' FROM DUAL UNION ALL
SELECT 'testcase string', 'tas' FROM DUAL UNION ALL
SELECT 'uglhwagp qvyntzmf','ulhwagpqvyntzmf' FROM DUAL UNION ALL
SELECT 'qrkacxx wwfja jsyjdffa vwfgxf','qcfvf' FROM DUAL UNION ALL
SELECT 'z wzsgovhh jopw igcx muxj xmmisxdn t lmb','gcujxlb' FROM DUAL UNION ALL
SELECT 'kxf jgmzejypb ya','e' FROM DUAL UNION ALL
SELECT 'fe oxyk y','ex' FROM DUAL UNION ALL
SELECT 'o wr fmik','owrfmik' FROM DUAL UNION ALL
SELECT 'pgezt yozcyqq drxt gcvaj hx l ix xemimmox','e' FROM DUAL UNION ALL
SELECT 'kqclk b hkgtrh','k' FROM DUAL UNION ALL
SELECT 'sia prcrdfckg otqwvdv wzdqxvqb h xclxmaj xjdwt lzfw','crwqqhxl' FROM DUAL UNION ALL
SELECT 'teatsase','tas' FROM DUAL;
```
Outputs:
> 
> 
> ```
> 
> SENTENCE                                            | WORD            | OUTPUT                                             
> :-------------------------------------------------- | :-------------- | :--------------------------------------------------
> teatsase                                            | tas             | t0a0s000                                           
> fe oxyk y                                           | ex              | 0e00x0000                                          
> o wr fmik                                           | owrfmik         | o0wr0fmik                                          
> kqclk b hkgtrh                                      | k               | k0000000000000                                     
> testcase string                                     | tas             | t0000as00000000                                    
> kxf jgmzejypb ya                                    | e               | 00000000e0000000                                   
> uglhwagp qvyntzmf                                   | ulhwagpqvyntzmf | u0lhwagp0qvyntzmf                                  
> qrkacxx wwfja jsyjdffa vwfgxf                       | qcfvf           | q000c00000f000000000000v0f000                      
> z wzsgovhh jopw igcx muxj xmmisxdn t lmb            | gcujxlb         | 00000g000000000000c000u0j0x0000000000l0b           
> pgezt yozcyqq drxt gcvaj hx l ix xemimmox           | e               | 00e00000000000000000000000000000000000000          
> I do not control the speed at which lobsters die    | code            | 000000000co00000000000000d000000000000000e000000   
> sia prcrdfckg otqwvdv wzdqxvqb h xclxmaj xjdwt lzfw | crwqqhxl        | 000000cr000000000w0000000q00q00h0x0l000000000000000
> 
> ```
> 
> 
*db<>fiddle [here](https://dbfiddle.uk/?rdbms=oracle_18&fiddle=3e7b37e6ff4dcb9ab672691602238b6c)*
[Answer]
# [Python 3](https://docs.python.org/3/), ~~90~~ ~~80~~ 81 bytes
-10 bytes (thanks to @Danis)
-Fixed error when trying to access first character (thanks for @xnor for reporting)
+1 byte: Fixing return error
```
def f(t,g,i=0):
 l=['*']*len(t)
 for c in g:i=t.find(c,i);l[i]=c*(i>=0)
 return l
```
[Try it online!](https://tio.run/##DcvBCoMwDADQu18RejEtRQa7Kd2PiAepaRcoUdrssK@vXh@866/fU969H5QgofrsObzsPEAJ6@jGzRUSVDtAOitEYIE8c9ApsRwYPdulrLyF6JA/T1wq6a8KlH5VFsWERqlp3BtB04ey8WB0b8bafgM "Python 3 ‚Äì Try It Online")
[Answer]
# [brainfuck](https://github.com/TryItOnline/brainfuck), ~~131~~ ~~106~~ ~~96~~ 89 bytes
```
>>,----------[++++++++++>,----------]<[<],>[<[<+>>-<-]->[[-]<.+>]<[<.[-],>+]<[>>+<<-]>>>]
```
Input is taken as `sentence\ntarget` where `\n` is a newline
[Try it online!](https://tio.run/##TYkxCoAwEAR7X5H@El8Q9iNHihg5MYKgoomvj2cjTrPD7LDHeZUzLa0B1n0wffxz8OyDBesQ4LwLDsyae8L79eoWpAqQ1xtAaG3bl5hqNaVIjiYfdx5FormKTFW6LcklDw "brainfuck ‚Äì Try It Online")
-25 bytes (thanks to @cairdcoinheringaahing)
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), ~~38~~ 32 [bytes](https://github.com/abrudz/SBCS)
-6 bytes by using a space instead of `*` as a blank out character.
A port of my [Python answer](https://codegolf.stackexchange.com/a/217712/64121). Assumes `‚éïIO‚Üê0`.
```
{√ó‚â¢‚çµ:(‚äÉx‚Üë‚ç∫),(‚ç∫‚Üì‚ç®x‚Üê‚äÉ=‚åø‚Üë‚ç∫‚çµ)‚àá1‚Üì‚çµ‚ãÑ‚çµ}
```
[Try it online!](https://tio.run/##TZC7ihRBFIbzfYqT9S4oKGaCkYkTCa4vUFO3vlRNdV2m63SLkTJee1iRxXwjA8FkNzFZ0DepFxlP74CYHIrv//6Cc1hv7ouRGacPZX@5el52Fw8Or/58Kx@uynzz@LR8fINl96XMv87undIsu69l/k7ogpIn5fPtMST3rLx/9/Auvimf3tJ8fVCLNu/JLPOPMl///vlo0feX5y@e0nz5bHV@qLgTslLVCoSDjUvA3SYFZyDVEmIvpQCWINcNr8G4dUwyRBCNrE6qxCIVk4yJs0hyCs1GE9@aOjPd@2HcpMkqcrb6iOAfO6k8V8OS@dAxjgg5q5ZBG8dWKMVgyErj4mm@bdGsyZwgT1G7oa6hdX2GRnMEu8UW0NomothAAmPXVFo26lBBq@0k27Ffw8gWjMSVBIdjByMBl4OyTUfUQQ5w9z62ey2nBKOb@Og9iIAJNB9YCzWCgQYBpW2sdUj@0u88Nx2soe50CjVBHrL3NRrKYsOgDzwIxTsNLvk8iIGWER4HTxVAbtDS39iKTCtMKv93XpYinbf6Cw "APL (Dyalog Unicode) ‚Äì Try It Online")
**Commented**:
```
{ ... }         ‚çù A dfn taking two arguments:
                ‚çù - the target word as the left argument ‚ç∫
                ‚çù - and the sentence as the right argument ‚çµ
√ó‚â¢‚çµ:            ‚çù if the length of ‚çµ is positive:
        ‚Üë‚ç∫‚çµ     ‚çù mix ‚ç∫ and ‚çµ into a character matrix, padding the shorter with spaces
      =‚åø        ‚çù for each row, check if the two characters are equal
     ‚äÉ          ‚çù take the first result
                ‚çù this is now ‚ç∫[0] = ‚çµ[0], but this is 1 if ‚ç∫ is empty and ' ' = ‚çµ[0]
   x‚Üê           ‚çù and store it in x
‚ç∫‚Üì‚ç®x            ‚çù drop x (0 or 1) characters from ‚ç∫
‚àá               ‚çù and call the dfn recursively with this value
 1‚Üì‚çµ            ‚çù and with ‚çµ without he first character
(          ),   ‚çù prepend to the result of the recursive call
   ‚äÉ            ‚çù the first character of 
      x‚Üë‚ç∫       ‚çù take the first x characters of ‚ç∫
                ‚çù if one of these strings is empty, ‚äÉ and ‚Üë use a space as a default value
‚ãÑ‚çµ              ‚çù if the length of ‚çµ is not positive, return ‚çµ
```
[Answer]
# [Husk](https://github.com/barbuz/Husk), 15 bytes
```
¬´S‚Üì‚ÇÅŒª?‚Üê¬π'*‚ÇÅ
‚Ç¨‚Üë1
```
[Try it online!](https://tio.run/##yygtzv7//9Dq4Edtkx81NZ7bbf@obcKhnepaQA7Xo6Y1j9omGv7//z85PyX1v6dCSr5CXn6JQnJ@XklRfo5CSUaqQnFBamqKQmKJQnlGZnKGQk5@UnFJalGxQkpmKgA "Husk ‚Äì Try It Online")
It took a while, but here's a short(ish) working solution.
### Explanation
The second line is a helper function, it shortens the program because we would have to call it twice, and it would need brackets both times if it was inlined.
```
‚Ç¨‚Üë1       Input: a string and a character, Output: 0 or 1
 ‚Üë1       Get the first 1 characters of the string
‚Ç¨         Return the index of the character in this substring (0 if missing)
```
This function tells us if the given character is the same as the character at the beginning of the string. There would be a simpler way of doing this (`=‚Üê`), but `‚Üê` on an empty string returns a space character, and this would mess up things.
The rest of the program is a call to mapacL (`¬´`), which scans a list using two functions, one to update the internal accumulator and the other one to generate the output. In practice, we will loop through the sentence character by character, our accumulator will start as the target word, and at each step we will update the accumulator using the current input character and the first function (`S‚Üì‚ÇÅ`), and we will generate one output character using the accumulator, the current input character, and the second function (`Œª?‚Üê¬π'*‚ÇÅ`).
Updating the accumulator means discarding the first character from it if it matches the current input character:
```
S‚Üì‚ÇÅ     Input: accumulator and current character, Output: new accumulator
  ‚ÇÅ     Call helper function (1 if character matches, 0 if it does not)
 ‚Üì      Drop that many characters
S        from the first input (accumulator)
```
Generating output characters means returning the character itself if it matches, and returning `'*'` if it does not:
```
Œª?‚Üê¬π'*‚ÇÅ    Input: accumulator and current character, Output: character or '*'
      ‚ÇÅ    Call helper function (1 if character matches, 0 if it does not)
 ?         If 1:
  ‚Üê          get the first character from
Œª  ¬π           the accumulator
           Else:
    '*       Return '*'
```
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 37 bytes
```
.
_$&
+`.(.)((_.)*¬∂)_\1
$1_$2
(.).
$1
```
[Try it online!](https://tio.run/##DchBCsMgEAXQ/ZziL6RoCwPpLXKHgk11QCE4QQd6sx4gF7PZPV4Xq22bkym6Gz3e7Dl4Hzncz1@Ir4XcEt2TruWLc67IiqaGpM267rAiGIdIxmb4lpoKdv0Mkz6Qq1DSLH8 "Retina 0.8.2 ‚Äì Try It Online") Uses `_` as the filler. Explanation:
```
.
_$&
```
Prepend a `_` to every character (both of the string and the target).
```
+`.(.)((_.)*¬∂)_\1
$1_$2
```
Find a character which is not before a character that has already been swapped that matches the first character of the original target, and swap it with its preceding `_`, removing it from the target, and repeat until the target is empty.
```
(.).
$1
```
Remove alternate characters, i.e. keeping the `_`s unless the target character was swapped.
[Answer]
# [Red](http://www.red-lang.org), 71 bytes
```
func[s t][c: take t parse s[any[change[not c skip]"*"| c(c: take t)]]s]
```
[Try it online!](https://tio.run/##lZNNjtwgEIX3c4onVkmOMDfINlvLC5p/24D5scFW7t4htrtHkRKlhw0qFe@r4lFEwe8/BO/6N/l@l4tjXULuO/aOTEeBjJnGJJA66raOaeqU6JzPYEijmXvyjfwE@/I8/rXvU3@XPgrKNE7WG9oi38E9DqV3OfoJWTfsLAQHzSjatPOTv6UsYgI3ghwq5rkgJyCLlBn93UuOxqkj/99FMk2XflGTLlTNCOvm8m7lKwSynKKn5mSFOFJWK0qRA8WQtoFLSbEWqeo/uSQwuR7ZE7Kj7En5VWsMfi4wilXYpQ6o1ppUuWv2T/b2B48otgx1ul2NjFViUHYXwzbfsNGXXCEPS6WAr9uI7TUzH@pKrht4lAhpzfgpvS/x0JyMWYk9Y/M720IAjzVDsZUO0BUTTEUV1ljrK/nbDcbAphE36FHlqF9sgzxqJ0MxRxa5ZKOCz6GsfG2vwkNdQ4Oisqna1ksdeGlvsctC2kzGEoKu03MuaU5tLj/jwTWXfdfKG5fRtR9jkeBEmYwTOML8EbbUR3TtPfr7Lw "Red ‚Äì Try It Online")
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 42 bytes
```
c_~f[a:c_:"*",b___]~d___=a<>f[b]@d
_f[]=""
```
[Try it online!](https://tio.run/##VVC7jtswEOz9FQsZCJLAaVIecgcBqdKlNwyB4psSTZFciysZvl936EdeDcGd2ZnFjGdopGdoObteefeu9uyFdy/N52bXd113eBf1fWXf3tS@P7Ri06n94bVprj@TPeL@vN1evrx9VG373bDEOMqU2@3XT//Phw9t25435@YHiADHgMDDEVMYod6GPEkpgCEUY7mBMfT5JgNhZbNreBCyueyqGGVGznIVYL2tK4csP6iTHk1heoI4L0dcvark6QH9Qe6LMQ2ME0EpyjFweXFCKQZzUZpuosjV/FxdoaxZh9kYcGEqYDUn8CdyQN7bTOIICKPvq0rzk6Oxf@gGUuC0X6Vbph4WVvlnACUh0DLAcoPogQUoCZS3Q8VCSfffnZi0XBGWsPIlRhCJEDSfmQNDMIIlIOmt94H@@g@RjwP0YAaNyVT8aZUtgynxJBQfNASMZRZzTScizbGuA/GRfLUmJ0rNtKpyKz6VGA2Nv8tnmGv5/7aOGdl9bi6by/UX "Wolfram Language (Mathematica) ‚Äì Try It Online")
Input two characters sequences as `f[word][sentence]`.
[Answer]
# [Elixir](https://elixir-lang.org/), ~~184~~ 169 bytes
```
defmodule A do
def f x,y do
cond do
x==""->x
q(x)==q(y)->q(y)<>f p(x),p y
1->"*"<>f p(x),y
end
end
def p(x)do
String.slice(x,1..-1)
end
def q(x)do
String.at(x,0)
end
end
```
[Try it online!](https://tio.run/##bVG7jtswEOz1FQtVVmAbcR8buPKqK/IFNF@iRIriQ@JSP@@QCmLg7BR87OzM7JLLtULlHw/GhbFs0Rw@gNmmhCAAj7kG1E6snni9tu3pho07YHe9ukPuTre6/7oJmAt2nCE3l9Ot/dE@odzwie2relaoOP2OXk3yHLSi/IDHy/l8unRPkvtGIrEwfnb/bB6fX@d5iQE@zuLQfpa@YLIRSo/RWw2x5xBmzhmQCKlXtAdt7yFyH4Ap3h6hpZbxtmu@@UQeIiWhaPeilRZJeGUtUveJyBncmqe4GVF5y1/sCb1onB8JRYSUxEBgCHlgQhBYk5C46x0V65tqg7QFade@h8HOCZSkCGbBAdAYFZBNEEGbezWQdBlQ318tRhQwSLPxIc93yKRS394tOFjMI@Q9i69pC8mDMGqsaZv8fn3hzJJvEbLdaHYOmMcIkq5kgB5Bg0JAbpQxFv/bwOioHuEO/Sij7yvlrUBQBGZPPRN0lGCjSytby/8wh6srSkCq0ZSCOLBUfmUTaR@zT871qN9HTWIoo37O@PEH "Elixir ‚Äì Try It Online")
[Answer]
# [Stax](https://github.com/tomtheisen/stax), ~~24 18 17~~ 16 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
```
√π‚Üê‚åê0√∏\d‚ñÄ‚Üí"Œµ‚ïû‚ò∫Œì|‚ñì
```
[Run and debug it](https://staxlang.xyz/#p=971ba930005c64df1a22eec601e27cb2&i=%22code%22,%22I+do+not+control+the+speed+at+which+lobsters+die%22%0A%22tas%22,%22testcase+string%22%0A%22ulhwagpqvyntzmf%22,%22uglhwagp+qvyntzmf%22%0A%22qcfvf%22,%22qrkacxx+wwfja+jsyjdffa+vwfgxf%22%0A%22gcujxlb%22,%22z+wzsgovhh+jopw+igcx+muxj+xmmisxdn+t+lmb%22%0A%22e%22,%22kxf+jgmzejypb+ya%22%0A%22ex%22,%22fe+oxyk+y%22%0A%22owrfmik%22,%22o+wr+fmik%22%0A%22e%22,%22pgezt+yozcyqq+drxt+gcvaj+hx+l+ix+xemimmox%22%0A%22k%22,%22kqclk+b+hkgtrh%22%0A%22crwqqhxl%22,%22sia+prcrdfckg+otqwvdv+wzdqxvqb+h+xclxmaj+xjdwt+lzfw%22&m=2)
-6 bytes, following Dingus's idea.
-1 byte from recursive. (`h=` ‚Üí¬†`h`)
-1 byte, using `\0` as a filler character.
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), ~~63~~ 57 bytes
```
$t,$s=$args
-join($s|%{"*$_"[($c=$_-ceq$t[+$i])];$i+=$c})
```
[Try it online!](https://tio.run/##VVHLbsIwELznK1aVKRDoF6BISD31RCV6Qwi5zjqPhjhkN69Svp3aCSl0D1l7MjuTyRamwZJizLKr0BDA@Sp4KSgQsozIe0lNks8E/UzOT744PO1mQgXi8KLwJHi3EMl@vl@JZBEIdZlfL563nnnecjZ9g9BAbhiUybk0GXCMQAViCJKhiRMVQ2Y@ia03hAlOl1NlQtf8sZTx/1X4/@rj0KZz58dIrCRZDy6TPLI6LMk9HUXSODOQqyiLGxkVcKq7nL@P2hKrAXpE/AHy/7B@@FR@SdW20DQ6lZBSl4ZaS6gbHbVu7KR03XcXoTfVj19d99dBSiOYtvuCztKxddltpvYxlGSyoR7SSJ@G194cfmACZw9sCcKcMVe4BMF2b8j2gG2Biu0PD0AcBlqJVGVsgWe76hsT1uNwz9m9b18rYnPcfKZ2fL8@byulkMjJ3Obd9u/6K9hUXFR8J6xge5N02Ci/go/BMBitL97l@gs "PowerShell ‚Äì Try It Online")
-6 bytes thanks to mazzy!
[Answer]
# [SNOBOL4 (CSNOBOL4)](http://www.snobol4.org/csnobol4/), 134 bytes
```
	S =INPUT
	W =INPUT
N	W LEN(1) . M REM . W	:F(O)
	S ARB . L M REM . S
	O =O DUPL('*',SIZE(L)) M	:(N)
O	OUTPUT =O DUPL('*',SIZE(S))
END
```
[Try it online!](https://tio.run/##ZYy9CoMwFIXn5CnuZlJKodBJcGgxBSEmYhShWzUBBfEWE@jjp1napdP5OH9@wxHXS4zEQFGppu8oGb6kEkqh2JnDCWpoRZ10IPmdaU7T4NrekiF/kaFEQ6Gh7BvJskN2NNVDMMk51CRnilNNdN@l5/@S4ZwKVcZYgUXYMMCEW9hxhTA78C/nLDwDvOdlmmHF0Qe3e7CLoxNa9wE "SNOBOL4 (CSNOBOL4) ‚Äì Try It Online")
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~49~~ 46 bytes
-3 thanks to @ceilingcat
```
f(s,w)char*s,*w;{for(;*s;s++)*s-*w?*s=42:w++;}
```
[Try it online!](https://tio.run/##bVPLbtswELz7KwYOCtiyU7hpT1XSnnrIuTk19YHmS9SLEkmLlAJ/u0s1kWwgISBRnB2uZodLeispPd@ompZHxnFvHVP6c/bjLFZ269c0Iyax28SnL0KbVZrY1G4268TeJv5nYh@@3X33m016Ot8wLlTN8YQvd4tp8fvxzy983e0WC1U7VETVqzVeFgvEMWaGfX7aP4@sPR5iYMSXj2AatXagunZGl3AZh204ZyAOPlM0Q6kP1nFjwRRfbl/3OW4dJTZynVG1nOCjLDNPZIO262s3VGIKtKYgNAR4L3KC3PY5E4Kg80KGmTTAD1bqLsuQ68ZDSRpQHUOOUFXKBlbDoawOE78IArmsBp73zQE9mXDBoUNfoJ8ADW8gKlVMQCP54NDrgfZtC2aCg6QdyZEFlFABgVeqqnSYf9XSssABWSGdySbUKoLGUMMELSS0a33HulgEa0PXRjICLUMV04ac@Sh9EP5iIHE2Grg8pVdH5D84IqrZxXZiZ6tfnX5nNBXdvJD0mIdy9mtOw@e6tDfXvsyMGaHGt20WymsFUfL4/f81NurYbyoK3qVxusdTnGLbvumfmeNoYrM4sVp@sn/r8VluY1eq/TYWrvbr9P2GeDHG@FX4w1xzpjfS6UI13B1NHbUtTud/ "C (gcc) ‚Äì Try It Online")
Just noticed that there's another C answer that is even shorter. Nevermind, I leave mine here.
[Answer]
# ARM Thumb-2 machine code, 24 bytes
Machine code
```
f811 2b01 7803 4293 bf18 232a f800 3b01
d1f8 2a00 d1f4 4770
```
Commented assembly:
```
        .syntax unified
        .arch armv6t2
        .thumb
        .globl lobstah
        .thumb_func
        // C callable.
        // void lobstah(char *sentence, const char *target);
        // Input:
        //   sentence (null terminated string): r0
        //   target (null terminated string): r1
        // Output:
        //   sentence is modified in place
        //
        // This is nothing but the obvious approach: a linear
        // search loop. Sometimes, that's best. ¬Ø\_(„ÉÑ)_/¬Ø
lobstah:
.Lnext_target:
        // Load next byte from target, increment (wide insn)
        ldrb    r2, [r1], #1
        // Search
.Lsearch_loop:
        // Load byte from sentence
        ldrb    r3, [r0]
        // Is it our target?
        cmp     r3, r2
        // If it wasn't, replace with a '*'
        it      ne
        movne   r3, #'*'
        // Store back and increment (wide insn)
        strb    r3, [r0], #1
        // Loop while we don't have a match
        // (the flags were not modified since the cmp)
        bne     .Lsearch_loop
.Lsearch_loop.end:
        // Loop unless we reached the null terminator.
        cmp     r2, #0
        bne     .Lnext_target
.Lend:
        // Return
        bx      lr
```
[Try it online! (sorta)](https://travis-ci.com/github/easyaspi314/easyaspi-ppcg/jobs/474799271#L439)
It is nothing but the obvious approach, a linear search loop. You really can't make anything smaller than that. ü§∑‚Äç‚ôÇÔ∏è
]