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"
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 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.