# F5-IndexOf various characters at once

**URL:** <https://forum.kirupa.com/t/f5-indexof-various-characters-at-once/31605>\
**Category:** flash\
**Created:** [September 24, 2003, 8:45pm UTC](https://forum.kirupa.com/t/f5-indexof-various-characters-at-once/31605 "2003-09-24T20:45:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![borispc](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@borispc](https://forum.kirupa.com/u/borispc)\
**Post date:** [September 24, 2003, 8:45pm UTC](https://forum.kirupa.com/t/f5-indexof-various-characters-at-once/31605/1 "2003-09-24T20:45:08Z")

</div>

Hello!  
Is there a way to check if a string contains different characters in just one line?

//this would be for just a:  
if (stringAnalyzed.indexOf(“a”)!=-1){  
//whatever actions;  
}

//what If I want to check different ones inside that same conditional?  
if (stringAnalyzed.indexOf(“a”|| “b”)!=-1){  
//whatever actions;  
}  
I know this doesn’t work. What is the right syntax?  
thanx:toad:
