indexOf not working as expected?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2021 06:14 AM
How to compare the string with exact match?
myString = "networkgroup@abc.com";
"network@abc.com" also satifying this condtion
Is there a way to find the exact string insted of indexOF()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2021 06:27 AM
That's for example I have shared the below is like i want
Comment = 'EVM00238-to1' not found/n
mystring = EVM00238
if(Comment.indexOF(mystring)>-1)
this condition is satifying right now but I dont't want to do that, instead I want to match the exact string
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2021 06:38 AM
I am not comparing eamil id for exaMPLE i HAVE shared that,
Comment = 'EVOOTBM-T05' is not exist;
myString = EVOOTBM;
if(Comment.toString.indexOF(myString)>1)
Now this should not satify but is is matching,
That's why I want a exact string matching condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2021 07:12 AM
Do you only want to compare the value inside the ''?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2021 07:26 AM
yes you are right
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2021 07:31 AM
How about this one:
comments = 'EVMTMW-WOZ' item not found/n 'TMAQW-WOZ' does not exist
There are two of them with ''. Do you need both of them or just the first instance?