title: Using Regex in Android Studio can't get the output
body: <p>I am currently working on an app search button. The button is called srhButton, so once this button is clicked in the search area named (id = query) i would want the variable to check if the (id = query) is in my saved list, and print it out in my Output Ares (id = comment). my problem is my output won't change.</p>
  
  <p>If just say the query is la(la), and if the list contains la(la), it needs to print yes in the comment area.</p>
  
  <p>The code:</p>
  
  <pre><code>srhButton.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View v) {
  
  
                  String searchQuery = query.getText().toString();
                  String joined = TextUtils.join(",", savedList);
                  Pattern ptrn = Pattern.compile("!*\\w*(^[^(]+);\"\\([^(]*?\\).*!;");
                  Matcher matcher = ptrn.matcher(searchQuery);
                  Matcher matcher1 = ptrn.matcher(joined);
                  while (matcher.find()) {
                      if (matcher.group(0) == matcher1.group(0)) {
                          comment.setText("YES");
                      }
                      else
                          comment.setText("invalid number");
  
                      }
                  }
  </code></pre>