openregex-scala


License

License

Categories

Categories

Scala Languages
GroupId

GroupId

edu.washington.cs.knowitall
ArtifactId

ArtifactId

openregex-scala_2.9.3
Last Version

Last Version

1.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

openregex-scala
openregex-scala
Project URL

Project URL

http://github.com/knowitall/openregex-scala
Project Organization

Project Organization

edu.washington.cs.knowitall
Source Code Management

Source Code Management

https://github.com/knowitall/openregex-scala

Download openregex-scala_2.9.3

How to add to project

<!-- https://jarcasting.com/artifacts/edu.washington.cs.knowitall/openregex-scala_2.9.3/ -->
<dependency>
    <groupId>edu.washington.cs.knowitall</groupId>
    <artifactId>openregex-scala_2.9.3</artifactId>
    <version>1.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/edu.washington.cs.knowitall/openregex-scala_2.9.3/
implementation 'edu.washington.cs.knowitall:openregex-scala_2.9.3:1.1.1'
// https://jarcasting.com/artifacts/edu.washington.cs.knowitall/openregex-scala_2.9.3/
implementation ("edu.washington.cs.knowitall:openregex-scala_2.9.3:1.1.1")
'edu.washington.cs.knowitall:openregex-scala_2.9.3:jar:1.1.1'
<dependency org="edu.washington.cs.knowitall" name="openregex-scala_2.9.3" rev="1.1.1">
  <artifact name="openregex-scala_2.9.3" type="jar" />
</dependency>
@Grapes(
@Grab(group='edu.washington.cs.knowitall', module='openregex-scala_2.9.3', version='1.1.1')
)
libraryDependencies += "edu.washington.cs.knowitall" % "openregex-scala_2.9.3" % "1.1.1"
[edu.washington.cs.knowitall/openregex-scala_2.9.3 "1.1.1"]

Dependencies

compile (5)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.9.3
edu.washington.cs.knowitall : openregex jar 1.1.1
com.google.code.findbugs : jsr305 jar 2.0.1
edu.washington.cs.knowitall.common-scala : common-scala_2.9.3 jar 1.1.2
junit : junit jar 4.11

test (2)

Group / Artifact Type Version
org.scalacheck : scalacheck_2.9.3 jar 1.10.1
org.specs2 : specs2_2.9.2 jar 1.12.3

Project Modules

There are no modules declared in this project.

OpenRegex-scala

OpenRegex is written by Michael Schmitz at the Turing Center http://turing.cs.washington.edu/. It is licensed under the Lesser GPL. Please see the LICENSE file for more details.

OpenRegex-scala provides scala bindings against OpenRegex. The Scala bindings use Scala collections as well as providing a more familiar API for Scala users.

OpenRegex-scala also includes a PatternParser implementation that uses reflection to run over any class out of the box. Any public field or 0-argument method may be used to match against a string. There is an exact string matcher (single quotes) and a regular expression matcher (forward slashes). Multiple aspects of a class can be matched against and combined with a logical expression.

    case class Point(x: Int, y: Int)
    val parser = PatternParsers.reflectionWithLogic[Point]
    val regex = parser("<x='1' | x='2'> <x='3' & y='3'>")
    regex.matches(Seq(Point(1, 1), Point(3, 3)))

Using regular expressions, the pattern could have been expressed equivalently.

    val regex = parser("<x=/[12]/> <x='3' & y='3'>")
edu.washington.cs.knowitall

KnowItAll

Versions

Version
1.1.1
1.1.0