|
没有什么字符串处理是REGEX搞不定的- let
- RE = (regex as text, str as text) =>
- let
- html = "<script>var regex = " & regex & "; var str = """ & str & """; var res = regex.exec(str); document.write(res)</script>",
- res = Web.Page(html)[Data]{0}[Children]{0}[Children]{1}[Text]{0}
- in res,
- Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WerGh+dnULS/WbdA1sjAyer+nx9AgIuLFlp3Pp6x4uagNSOqGmwW46gT4KTu6BhkEe7j6+JgY6jybuuFle78hUPnTnmlP1y57OrkRyA7wV45wNjI0AAIjQ13DeP+SjNSi4nhdpVgdWlpkBLPICMjTM7DUMzKA2onmoEMLDA2MzYwOLQgAChmaWBxaALEZbvTT9XtetG952jf/acOep4vmPe1acGiBl6+uf4hHsClQ29O2TVArlI1NzA2fzlnxdPeup9uXPl/RjepXNPdB7DWG2WtJvL3BwZYk2uvs6Aey2NBY19D66fydL9atfbJ724v9s5/2L37WtfRp62ZgkD/t73q6a/6z6cufd64E2d67+vmU+U+XtDyf0AaUtX6yY+3T7fMgqq2VDQzMjSyNDYzikYVB9sUCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Descriptions = _t]),
- #"Added Custom" = Table.AddColumn(Source, "Custom", each RE("/PO#[a-z0-9\-]+/i", [Descriptions]))
- in
- #"Added Custom"
复制代码
|
|