I am using data table and I want to mark out observations with a substring ".." in a longer string. After looking at How to select R data.table rows based on substring match (a la SQL like) I tried
like("Hi!..", "..")
which returns TRUE and
like("Hi!..", "Bye")
returns FALSE. However, surprisingly,
like("Hi!". "..")
returns TRUE! If this is a feature, why is that? And what can I use instead if I want to check a substring for non-letter characters?