Adjust RegEx for RfC show
This commit is contained in:
@ -45,7 +45,7 @@
|
|||||||
- Timeout::timeout(2) do
|
- Timeout::timeout(2) do
|
||||||
// (?:\\"|.) is required to correctly identify " within the output.
|
// (?:\\"|.) is required to correctly identify " within the output.
|
||||||
// The outer (?: |\d+?) is used to correctly identify integers within the JSON
|
// The outer (?: |\d+?) is used to correctly identify integers within the JSON
|
||||||
- messages = output.scan(/{(?:(?:"(?:\\"|.)+?":(?:"(?:\\"|.)*?"|\d+?|\[.*?\]|null))+?,?)+}/)
|
- messages = output.scan(/{(?:(?:"(?:\\"|.)+?":(?:"(?:\\"|.)*?"|-?\d+?|\[.*?\]|null))+?,?)+}/)
|
||||||
- messages.map! {|el| JSON.parse(el)}
|
- messages.map! {|el| JSON.parse(el)}
|
||||||
- messages.keep_if {|message| message['cmd'] == 'write'}
|
- messages.keep_if {|message| message['cmd'] == 'write'}
|
||||||
- messages.map! {|message| message['data']}
|
- messages.map! {|message| message['data']}
|
||||||
|
Reference in New Issue
Block a user