Rational Programming Patterns for System z

Using regular expressions and operators

Regular expressions or operators can be used in the SPARQL queries to filter the search.

Regular expressions

Tutorials on how to code SPARQL queries are available on the internet but here is a reminder of the main regular expressions.

Table 1. List of the main regular expressions
Option Description
"AR" The sequence contains AR
"^S" The sequence begins with S
"O$" The sequence ends with O
"D*" The sequence contains zero or more occurrences of D
"M?" The sequence contains zero or one occurrence of M
"m.*r" The sequence contains M followed by any character and R
"m.*r", "i" The sequence contains M followed by R ignoring case

Operators

You can also use operators to express your query:

Table 2. List of the operators
Operator Function
A && B A and B
A UNION B A or B
A=1 'A' is equal to 1
A != 5 'A' is different from 5
A < 10 'A' is less than 10
A > 50 'A' is greater than 50
A <= 100 'A' is less than or equal to 100
A >= 500 'A' is greater than or equal to 500
A >= 5 && A <= 10 'A' is 5 - 10

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)