Phillip Wood <phillip.wood123@xxxxxxxxx> writes: > l.starts_with("locked ") > rather than having to do > l.starts_with("locked ") || l == "locked\n" l.regexp_matches("^locked[\s\n]")? Jokes aside, isn't the "space separated list" meant to be used more like: attrs = l.splitAtEach(" ") if "locked" in attrs: ... yeah it is locked ... if "broken" in attrs: ... ouch, it is broken ... so I am not sure if having always a trailing whitespace is a good idea to begin with (the last element may become an empty string if the splitting is done naively).