は、私は1つの変数文字列の開始と終了を一致させ、文字列全体を一致した値に整形するJavaScript正規表現ですか?
文字列
{"index":"logstash-cdr","search_type":"count","ignore_unavailable":true}
{"query":{"filtered":{"query":{"bool":{"must":[{"query_string":{"query":"*","analyze_wildcard":true}},{"query_string":{"query":"*","analyze_wildcard":true}}]}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"gte":1451586600000,"lte":1483208999000,"format":"epoch_millis"}}}],"must_not":[]}}}},"size":0,"aggs":{"2":{"terms":{"field":"PhoneNumber","size":100000,"order":{"_count":"desc"}}}}}
{"index":"logstash-cdr","ignore_unavailable":true}
{"highlight":{"pre_tags":["@[email protected]"],"post_tags":["@/kibana-highlighted-f[email protected]"],"fields":{"*":{}},"require_field_match":false,"fragment_size":2147483647},"query":{"filtered":{"query":{"bool":{"must":[{"query_string":{"query":"*","analyze_wildcard":true}},{"query_string":{"query":"*","analyze_wildcard":true}}]}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"gte":1451586600000,"lte":1483208999000,"format":"epoch_millis"}}}],"must_not":[]}}}},"size":50,"sort":[{"@timestamp":{"order":"desc","unmapped_type":"boolean"}}],"fields":["*","_source"],"script_fields":{},"fielddata_fields":["@timestamp"]}
{"index":"logstash-fraud","search_type":"count","ignore_unavailable":true}
{"query":{"filtered":{"query":{"bool":{"must":[{"query_string":{"query":"*","analyze_wildcard":true}},{"query_string":{"query":"*","analyze_wildcard":true}}]}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"gte":1451586600000,"lte":1483208999000,"format":"epoch_millis"}}}],"must_not":[]}}}},"size":0,"aggs":{"2":{"terms":{"field":"PhoneNumber","size":100000,"order":{"_count":"desc"}}}}}
{"index":"logstash-fraud","ignore_unavailable":true}
{"query":{"filtered":{"query":{"bool":{"must":[{"query_string":{"query":"*","analyze_wildcard":true}},{"query_string":{"query":"*","analyze_wildcard":true}}]}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"gte":1451586600000,"lte":1483208999000,"format":"epoch_millis"}}}],"must_not":[]}}}},"highlight":{"pre_tags":["@[email protected]"],"post_tags":["@/[email protected]"],"fields":{"*":{}},"require_field_match":false,"fragment_size":2147483647},"size":50,"sort":[{"@timestamp":{"order":"desc","unmapped_type":"boolean"}}],"fields":["*","_source"],"script_fields":{},"fielddata_fields":["@timestamp"]}
内の文字列を持っているが、私はちょうど
{"index":"logstash-fraud","search_type":"count","ignore_unavailable":true}
{"query":{"filtered":{"query":{"bool":{"must":[{"query_string":{"query":"*","analyze_wildcard":true}},{"query_string":{"query":"*","analyze_wildcard":true}}]}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"gte":1451586600000,"lte":1483208999000,"format":"epoch_millis"}}}],"must_not":[]}}}},"size":0,"aggs":{"2":{"terms":{"field":"PhoneNumber","size":100000,"order":{"_count":"desc"}}}}}
この行はどのように私にはJavaScriptを通じて同じことを達成することができ、印刷したいですか?
_java-script_? JavaScriptにする必要があります。それは本当に文字列です....私はjavascriptのオブジェクトに思えます。 – Jai
これを変数 –
に格納しています。次に、文字列/オブジェクトまたは他の型であることをどのように知っていますか? – Jai