egberts/bash-ini-file

`//` inline comment not yet supported.

egberts opened this issue · 1 comments

I know, I know, I know.... // inline comment is not yet supported.

But, but ... BUT I have a working Regex pattern for this. It is:

(((\x27[ \!\"\#\$\%\&\(\)\*\+\-\.\/0-9\:\;\<\=\>\?@A-Z\[\\\]\^\_\`a-z\|\~]*\x27\s*)|(\"[ \!\#\$\%\&\x27\(\)\*\+\-\.\/0-9\:\;\<\=\>\?@A-Z\[\\\]\^\_\`a-z\|\~]*\"\s*)|(\/([ \!\$\%\&\(\)\*\+\-\.0-9\:\<\=\>\?@A-Z\[\]\^\_\`a-z\|\~]+[ \!\$\%\&\(\)\*\+\-\.0-9\:\<\=\>\?@A-Z\[\]\^\_\`a-z\|\~]*)|([ \!\$\%\&\(\)\*\+\-\.0-9\:\<\=\>\?@A-Z\[\]\^\_\`a-z\|\~]*))*)*)([;#]+)*.*$

That regex has demonstrably worked on many online Regex testers:

Couldn't get it to work with the following online regex tester(s):

Just need a bit of major Bash-FU going on... and is on-going.

If you are a REGEX-BASH expert, can you translate that into a BASH shell string variable assignment?