Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Challenge 41 - Saying hi

Given a sentence, $s$, write a RegEx to match the following criteria:

  1. The first character must be the letter $H$ or $h$.
  2. The second character must be the letter $I$ or $i$.
  3. The third character must be a single space.
  4. The fourth character must not be the letter $D$ or $d$.

Given $n$ lines of sentences as input, print each sentence matching your RegEx on a new line.

Constraints:

  • $1 \le n \le 10$
  • Each sentence, $s$, contains $1$ to $10$ words.
  • Each word/token in a sentence is comprised only of upper and lowercase English letters.

Solutions