Skip to main content
Inspiring
March 7, 2017
Question

indexOf and special characters

  • March 7, 2017
  • 1 reply
  • 291 views

I am trying to find the index of a slash plus "v." I tried:

if (file_list.indexOf("\\v.")>-1)

but it doesn't work. If I take out the \\, it works but finds ALL instances of "v." Any ideas why it wouldn't? This is in a node.js script.

Thanks.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
March 7, 2017

This forum is about JS in PDF files, not web-pages. However, you will need to provide more information when you post your question as the code itself looks fine.