Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 3
    What do you mean with "whether or not it matches a character from an array"? Your array is an array of integers and not characters. Are you trying to see if the String contains a number 0-9? Commented Dec 7, 2021 at 14:05
  • What exactly is the array of characters you want to check, as @OHGODSPIDERS asked, it makes a difference if you just wanna check the presence of integers in your string or any other certain characters. Commented Dec 7, 2021 at 14:15
  • Be aware that what you are trying to do is something that Regular Expressions has standardized Commented Dec 7, 2021 at 14:18
  • @ControlAltDel, I think @ItchyPrune just wants to use some basic iteration and comparison operators instead of regex. Commented Dec 7, 2021 at 14:22
  • 1
    @ShivangGupta I agree with you. However I am a RegEx "evangelist" - I want the world to learn about the "glory" of what text search can be! Not that I expect that everyone in practical life will use them - I just want people to be aware. Commented Dec 7, 2021 at 14:31