Skip to content

Instantly share code, notes, and snippets.

@foolgry
Last active November 13, 2023 00:44
Show Gist options
  • Save foolgry/fd0ae6c5976e787b963566916252ca97 to your computer and use it in GitHub Desktop.
Save foolgry/fd0ae6c5976e787b963566916252ca97 to your computer and use it in GitHub Desktop.
utools 去除转义字符,展示json
let json=ENTER.payload
json = json.replace(/\\\\/g, "\\").replace(/\\\"/g, '"')
utools.redirect("json",json)
@foolgry
Copy link
Author

foolgry commented Nov 13, 2023

正则匹配

/^\s*({[\s\S]}|[[\s\S]])\s*$/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment