๋ฐ์ํ
let
IsValidEmail = (input as text) =>
let
name = Text.BeforeDelimiter(input,"@",{0,RelativePosition.FromEnd}),
ext = Text.AfterDelimiter(input,".",{0,RelativePosition.FromEnd}),
domain = Text.BetweenDelimiters(input,name&"@","."&ext),
return =
Text.Length(name) > 0 and
Text.Length(domain) > 0 and
Text.Length(ext) > 1 and Text.Length(ext) < 6 and
name = Text.Select(name, {"a".."z","A".."Z","0".."9","_","-","."}) and
domain = Text.Select(domain, {"a".."z","A".."Z","0".."9","_","-","."}) and
ext = Text.Select(ext, {"a".."z","A".."Z"})
in
return
in
IsValidEmail
let
IsValidEmail = (input) =>
if input = "" or input = null then null
else
let
name = Text.BeforeDelimiter(input,"@",{0,RelativePosition.FromEnd}),
ext = Text.AfterDelimiter(input,".",{0,RelativePosition.FromEnd}),
domain = Text.BetweenDelimiters(input,name&"@","."&ext),
return =
Text.Length(name) > 0 and
Text.Length(domain) > 0 and
Text.Length(ext) > 1 and Text.Length(ext) < 6 and
name = Text.Select(name, {"a".."z","A".."Z","0".."9","_","-","."}) and
domain = Text.Select(domain, {"a".."z","A".."Z","0".."9","_","-","."}) and
ext = Text.Select(ext, {"a".."z","A".."Z"})
in
return
in
IsValidEmail
https://www.myonlinetraininghub.com/power-query-custom-functions
๋ฐ์ํ
'Power BI > Power Query M' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Power BI] Power Query M ํจ์ - Json Text ์์ ๊ฐ ์ถ์ถ (0) | 2021.02.23 |
---|---|
[Power BI] Power Query M ํจ์ - Oracle์ LPAD ๊ธฐ๋ฅ (0) | 2020.05.18 |
[Power BI] Power Query M ํจ์ - Error Handling (0) | 2020.04.14 |
[Power BI] Power Query M ํจ์ - let, in (0) | 2020.02.12 |
[Power BI] Power Query M ํจ์ - +, List.Sum (0) | 2019.06.26 |