在记事本++中对宏不太了解,但是从本质上讲,我想接受此输入:
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);
client.calls('CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
.fetch()
.then(call => console.log(call.from));
并将其转换为:
"BAILIFF": [
"The prisoners will all stand.",
"All present, stand and make respectful attention to honouredJudge.",
"Before this gracious court now appear these prisoners toanswer for the multiple and grievous savageries of their species. Howplead you, criminal?",
"Criminals keep silence!",
"You will answer the charges, criminals.",
"Criminal, you will read the charges to the court.",
"All present, respectfully stand. Q",
"This honourable court is adjourned. Stand respectfully. Q"
],
"MCCOY": [
"Hold it right there, boy.",
"What about my age?",
"Troubles me? What's so damned troubling about not having died? How old do you think I am?",
"Explain how you remember that so exactly.",
"I don't see any points on your ears, boy, but you sound like aVulcan.",
"Almost as bad.",
"They are, they are. And damned annoying at times.",
"Well, this is a new ship, but she's got the right name. Now youremember that, you hear.",
"You treat her like a lady, and she'll always bring you home."
],
感谢您的帮助。谢谢。
答案 0 :(得分:3)
尝试使用此宏:
^("[^"]+")\s*:\s*\[\s*("[^\n]*?")\s*,(?=\R)|^("[^\n]*?") ("[^"]+")\R\K\h+("[^\n]*?)(?:,(?=\R)|\s*\],?)
(?2\2 \1)(?3\5 \4)
Run macro multiple times
和Run until the end of file