Write a regular expression that selects lines containing any of the following words: linux windows solaris macos.

LANGUAGE: Java

CHALLENGE:

Write a regular expression that selects lines containing any of the following words: linux windows solaris macos. For this exercise you must surround your solution with double quotes.

SOLUTION:

"^.*\b(linux|windows|solaris|macos)\b.*$"