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)
Azure OpenAI Architecture Patterns & Deployment Patterns
Sharing some useful links that will help customers architect Azure OpenAI solution using the best practices: (1) Azure OpenAI Landing Zone r...
-
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...
-
float p_size = 0.1; default { state_entry() { llSay(0, "Hello, Avatar!"); llSetPrimitiveParams( [ PRIM_...
No comments:
Post a Comment