top | item 37436452

(no title)

arpowers | 2 years ago

    const pattern = /I hope this (\w+) finds you well\./;

    if (pattern.test(text)) {
      console.log("is ai.");
    } else {
      console.log("not ai.");
    }

discuss

order

richbell|2 years ago

This won't work, you'd need at least... 3 more test cases.

    /I hope this (\w+) finds you well\.|It's important to note that |As a large language model/

wewtyflakes|2 years ago

You may need one of the adjacent spaces in your capture group

LoganDark|2 years ago

I hope this dfajklgsdfjklagsdfjklsd finds you well.