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 -%>")
sudo mount | grep -i vboxsf | grep dir
locate libc.so /lib/x86_64-linux-gnu/libc.so.6
grep LD_LIBRARY_PATH /opt/google/chrome/google-chrome
if [[ -n "$LD_LIBRARY_PATH" ]]; then
LD_LIBRARY_PATH="$HERE:$HERE/lib:$LD_LIBRARY_PATH"
LD_LIBRARY_PATH="$HERE:$HERE/lib"
export LD_LIBRARY_PATH