Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 610 Bytes

Readme.md

File metadata and controls

18 lines (12 loc) · 610 Bytes

XSD-Pattern-JS

This library parse a XSD (XML Schema), as defined by w3c ,regular expression (as use in a pattern facet). It can output an equivalent javascript (ECMAScript) regexp. This allows to validate an XSD pattern directly in javascript.

This library is written in Typescript.

Live demo

How to use it

Javascript

var xpj = require("xsd-pattern-js")
var pattern = new xpj.XsdPattern("A+");
pattern.match("AA"); //return true
pattern.match("AB"); //return false