org.apache.regexp

Class REDemo

public class REDemo extends Applet implements TextListener

Interactive demonstration and testing harness for regular expressions classes.

Version: $Id: REDemo.java 518156 2007-03-14 14:31:26Z vgritsenko $

Author: Jonathan Locke

Field Summary
REDebugCompilercompiler
TextFieldfieldMatch
TextFieldfieldRE
Components
TextAreaoutMatch
TextAreaoutRE
REr
Matcher and compiler objects
Method Summary
voidinit()
Add controls and init applet
static voidmain(String[] arg)
Main application entrypoint.
voidsayMatch(String s)
Say something into match text area
voidsayRE(String s)
Say something into RE text area
voidtextValueChanged(TextEvent e)
Called when text values change
StringthrowableToString(Throwable t)
Convert throwable to string
voidupdateMatch(String match)
Update matching info by matching the string against the current compiled regular expression.
voidupdateRE(String expr)
Change regular expression

Field Detail

compiler

REDebugCompiler compiler

fieldMatch

TextField fieldMatch

fieldRE

TextField fieldRE
Components

outMatch

TextArea outMatch

outRE

TextArea outRE

r

RE r
Matcher and compiler objects

Method Detail

init

public void init()
Add controls and init applet

main

public static void main(String[] arg)
Main application entrypoint.

Parameters: arg Command line arguments

sayMatch

void sayMatch(String s)
Say something into match text area

Parameters: s What to say

sayRE

void sayRE(String s)
Say something into RE text area

Parameters: s What to say

textValueChanged

public void textValueChanged(TextEvent e)
Called when text values change

Parameters: e TextEvent

throwableToString

String throwableToString(Throwable t)
Convert throwable to string

Parameters: t Throwable to convert to string

updateMatch

void updateMatch(String match)
Update matching info by matching the string against the current compiled regular expression.

Parameters: match String to match against

updateRE

void updateRE(String expr)
Change regular expression

Parameters: expr Expression to compile

Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.