Skip to main content
2 of 3
deleted 39 characters in body
M--
  • 1.3k
  • 8
  • 16

R, 34 bytes

\(x)grepl("\\bIll([^aiou]|$)",x,T)

Attempt This Online!

grepl(
  "            
  \\b          # a word boundary
  Ill          # followed by "Ill"
  ([^aiou]|$)  # followed by either a non-aiou character OR end of string"
  "  
  x,           
  T            # ignore.case = TRUE
)

Obviously we could port the same pattern used in JS answers:

R, 35 bytes

\(x)grepl("\\bIll(?![aiou])",x,T,T)

Attempt This Online!

M--
  • 1.3k
  • 8
  • 16