Parsing Using Java Regex:
import java.util.regex.*;
public class SampleRegex
{
public static void main(String[] params)
{
Pattern pattern = Pattern.compile("(.*):(.*)");
Matcher matcher = pattern.matcher(params[0]);
if(matcher.matches())
{
System.out.print("Key:");
System.out.println(matcher.group(1));
System.out.print("Value:");
System.out.println(matcher.group(2));
}
else
System.out.print("No match");
}
}
Further reading links:
1. http://www.developer.com/article.php/1460561
2. http://download.oracle.com/javase/tutorial/essential/regex/
Subscribe to:
Post Comments (Atom)
Using Handlebar Prompt in Semantic Kernal
> dotnet add package Microsoft.SemanticKernel.PromptTemplates.Handlebars --version 1.30.0 using Microsoft . SemanticKernel ; using Micr...
-
LINK: http://www.techonthenet.com/oracle/functions/nvl.php Oracle/PLSQL: NVL Function In Oracle/PLSQL, the NVL function l...
-
Setting up a MPI cluster on Ubuntu involves the following steps: 1. Install OpenMPI on all machines. $sudo apt-get install libopenmpi-de...
-
Very Useful Link: http://people.cc.ku.edu/~grobe/intro-to-LSL/index.html#particle Using the Linden Script Language This page is a short...
No comments:
Post a Comment