RegModel

Enhanced regular expression system. Based on functional-declarative programming


RegModel is easy way to looking regular text models.

RegModel allow you to :

Why RegModel is better than regular expression :


A typical usage:
   String bigString = "Women, from Montreal.";
   RegModel regModel = new RegModel(bigString);
   regModel.has("from"); //=> ok, selected model is 'from'
   regModel.any(); //=> ok, selected model is rest to the end ' Montreal.'
   regModel.toLeft$(); //=> change direction to search models from right to the left
   regModel.letter(); //=> ok, selected model is 'from'
   regModel.any(); //=> ok, selected model is rest to the begin 'Women, '

or

   String bigString = "width: 100px;";
   RegModel regModel = new RegModel(bigString);
   regModel.fromStart$()
          .letter(0,3) // => ok, selected model is 'wid'; accepted are between 0..3 letters
          .letter(2) // => ok, selected model is 'th' accepted are between 1..2 letters
          .char1(':') // => ok, selected model is ':' accepted one char ':'
          .wspace(); // => ok, selected model is ' ' accepted characters are all white space such:' \n\t\r'
   String width = regModel.digits().get(); // => ok, selected model is '100' accepted characters 0..9
   String unit = regModel.letter().get(); // => ok, selected model is 'px'

The images show what happend with the memory of JVM when scan 1'000'000 with different patterns.
regular expression regular expression

RegModel library code is under Apache 2.0 license, which makes it very clear that you can build commercial applications.
You can download RegModel library and examples from https://github.com/MladenMitev/RegModelParser.

To play video, you have need of browser supported HTML5 (version after 2014).
It is best seen on a PC.
Use ARROWS to skip +/- 5 sec. Use SPACE to play/pause.


RegModel overview




Example No 1




Example No 2




Example No 3




Example No 4




Example No 5

Also you can see jNode, platform for build native single-page application using only Java, HTML, CSS.


If you want RegModel library for JavaScript , C# , Python, please e-mail me.