<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<compilerArgument>-Xlint:all</compilerArgument>
<compilerArgument>-Xlint:-processing</compilerArgument>
<compilerArgument>-Dfile.encoding=${project.build.sourceEncoding}</compilerArgument>
chcp 65001
set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
cp -P /tmp/a /tmp/b.xml^M
/tmp/b.xml^M
\r
sed -i 's|\r||g' a.sh
public static void main(String args[]) throws Exception {
String regex = "\\/\\*(?!\\+)([^*]|\n|\\*[^/])*\\*\\/";
Pattern pattern = Pattern.compile(regex,
Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
List<String> candidates = Arrays.asList(
new String[] { "this is /* a \n test */", "this is /* a */ test */",
"this is /*+ hint */ test", "this is /* a /*+ hint */ test */" });
for (String candidate : candidates) {
Matcher matcher = pattern.matcher(candidate);
System.err.println("INPUT:" + candidate);
String group = null;
boolean found = false;
while (matcher.find()) {
found = true;
group = matcher.group();
System.err.println("MATCH:" + group);
}
if (!found)
System.err.println("NO MATCH");
{
}
}
}
java -cp target\classes com.github.sergueik.selenium.LookaheadTest
INPUT:this is /* a
test */
MATCH:/* a
test */
INPUT:this is /* a */ test */
MATCH:/* a */
INPUT:this is /*+ hint */ test
NO MATCH
INPUT:this is /* a /*+ hint */ test */
MATCH:/* a /*+ hint */
is /* a /*+ hint */ test */
deep_data:
group_key1:
key1: 'value1'
key2: 'value2'
group_key2:
key3: 'value3'
key4: 'value4'
key5: 'value5'
group_key3:
key6: 'value6'
$group_data = hiera('deep_data.group_key1')
$frag1 = inline_template( "<% @group_data.each do |key,value| %> key: <%=key %> value: <%=value %>\n<% end -%>")
$deep_data = hiera('deep_data')
$frag2 = inline_template( "<% @deep_data['group_key2'].each do |key,value| %> key: <%=key %> value: <%=value %>\n<% end -%>")
$flat_data = $deep_data['group_key3']
$frag3 = inline_template( "<% @flat_data.each do |key,value| %> key: <%=key %> value: <%=value %>\n<% end -%>")
https://www.whonix.org/wiki/Windows_Quick_Start