assuming I have a field "field1" with value "Hello world"
How can I make the value become "\nHello world"
When I gsub it will always become "\n"HelloWorld"
assuming I have a field "field1" with value "Hello world"
How can I make the value become "\nHello world"
When I gsub it will always become "\n"HelloWorld"
You can use the unicode escaped character.
"Hello World".gsub("Hello", "\u000aHello")
=> "\nHello World"
© 2020. All Rights Reserved - Elasticsearch
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.