Created
March 26, 2023 04:23
-
-
Save nazfox/994f5defca8561dcdbb9fa8fc5a71672 to your computer and use it in GitHub Desktop.
エスケープ文字列`\"`を含む`"`で囲われた文字列とマッチする正規表現
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function split_values() { | |
local fpat='([^,]+)|([[:space:]]*\"(\\\\.|[^\\\\"])*\"[[:space:]]*)' | |
echo "$1" | awk -vFPAT="${fpat}" '{for(i=1;i<=NF;i++){print $i}}' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment