You can make the same in Index Patterns - Pick your index - Scripted Fields.
I think that code is counting the quotation marks so just add -2 to the operation.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.