1

I have a task to find if a string contains only characters from one row. These are example strings: My, Keyboard, Is, Broken, Sorry, Maybe, I, Shall, Try, A, Typewriter These are rows:

List<char> row1 = new List<char>() { 'Q', 'q', 'W', 'w', 'E', 'e', 'R', 'r', 'T', 't', 'Y', 'y', 'U', 'u', 'I', 'i', 'O', 'o', 'P', 'p', };

        List<char> row2 = new List<char>() { 'A', 'a', 'S', 's', 'D', 'd', 'F', 'f', 'G', 'g', 'H', 'h', 'J', 'j', 'K', 'k', 'L', 'l', };

        List<char> row3 = new List<char>() { 'Z', 'z', 'X', 'x', 'C', 'c', 'V', 'v', 'N', 'n', 'M', 'm', 'B', 'b', };

Expected output: I, Shall, Try, A, Typewriter

max plant
  • 25
  • 1
  • Looks like you are looking to create a regex, but do not know where to get started. Please check [Reference - What does this regex mean](https://stackoverflow.com/questions/22937618) resource, it has plenty of hints. Also, refer to [Learning Regular Expressions](https://stackoverflow.com/questions/4736) post for some basic regex info. Once you get some expression ready and still have issues with the solution, please edit the question with the latest details and we'll be glad to help you fix the problem. – Wiktor Stribiżew Jun 18 '20 at 08:12

0 Answers0