API » History » Revision 2
Revision 1 (iri, 02/23/2011 08:35 PM) → Revision 2/3 (iri, 02/23/2011 08:36 PM)
h1. API h2. Easy interface : Here, the functions take several default parameters. They are useful if you need just to do basic manipulation. h3. _pcreEasyMatch Scans for a match in string for pattern. Prototype : *fun [S S] I* # S : pattern : any valid regular expression # S : string : any string to scan for matches +Return+ : I : 1 if matched, otherwise 0. (or nil if error) h3. _pcreEasySplit Breaks the string on the pattern, and returns an list of the tokens. Prototype : *fun [S S] [S r1]* # S : pattern : any valid regular expression # S : string : any string to scan for matches +Return+ : [S r1] : a list of string or nil if error h3. _pcreEasyReplace Replaces all occurrences of the pattern in the string with the replacement text. Prototype : *fun [S S S] S* # S : pattern : any valid regular expression # S : string : any string to scan for matches # S : replace : any text to replace each match with +Return+ : S : the new string (or nil if error) h2. Normal interface : Here, you can configure the result Return to the [[wiki|main page]]