in-ini: no whitespace in entry keys – but do encoding
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 06 Sep 2014 22:04:11 +0200
changeset 918146ad99fc67
parent 90 c96459e02690
child 92 03c1c831cfcb
in-ini: no whitespace in entry keys – but do encoding
java/alt2xml-in-ini/src/cz/frantovo/alt2xml/in/ini/Reader.java
     1.1 --- a/java/alt2xml-in-ini/src/cz/frantovo/alt2xml/in/ini/Reader.java	Sat Sep 06 21:41:15 2014 +0200
     1.2 +++ b/java/alt2xml-in-ini/src/cz/frantovo/alt2xml/in/ini/Reader.java	Sat Sep 06 22:04:11 2014 +0200
     1.3 @@ -149,9 +149,9 @@
     1.4  
     1.5  				},
     1.6  		ENTRY(
     1.7 -				"\\s*(?<key>[^=]+)\\s*=\\s*\"(?<value>[^']+)\"\\s*((;|#)\\s*(?<comment>.*)){0,1}", // quoted value → include spaces + might have comment
     1.8 -				"\\s*(?<key>[^=]+)\\s*=\\s*'(?<value>[^']+)'\\s*((;|#)\\s*(?<comment>.*)){0,1}", // apostrophed value → include spaces + might have comment
     1.9 -				"\\s*(?<key>[^=]+)\\s*=\\s*(?<value>.+)" // unquoted value → strip spaces + no comments
    1.10 +				"\\s*(?<key>[^=\\s]+)\\s*=\\s*\"(?<value>[^']+)\"\\s*((;|#)\\s*(?<comment>.*)){0,1}", // quoted value → include spaces + might have comment
    1.11 +				"\\s*(?<key>[^=\\s]+)\\s*=\\s*'(?<value>[^']+)'\\s*((;|#)\\s*(?<comment>.*)){0,1}", // apostrophed value → include spaces + might have comment
    1.12 +				"\\s*(?<key>[^=\\s]+)\\s*=\\s*(?<value>.+)" // unquoted value → strip spaces + no comments
    1.13  		) {
    1.14  					@Override
    1.15  					public void processLine(LineContext lc, FileContext fc) throws SAXException {