Commit bf13c009 authored by Serge Leblanc's avatar Serge Leblanc
Browse files

consistent reoganisation from v1-0-0

parent 662f8eb8
/**
* $Id: RegularExpression.java,v 1.3 2002-10-13 19:20:21 jerome Exp $
*
* Transmorpher
*
* Copyright (C) 2001 Fluxmedia and INRIA Rhône-Alpes.
*
* http://www.fluxmedia.fr - http://transmorpher.inrialpes.fr
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* @authors : Chomat Guillaume
* @date : 30 05 2001
* @content : attempt about regular expression in java
*/
package fr.fluxmedia.transmorpher.regexp ;
import java.util.*;
import gnu.regexp.RE;
import gnu.regexp.REException;
public class RegularExpression {
public static String substitute(String text,String source , String target) throws REException{
RE regularExpression = new RE(source);
return regularExpression.substitute(text,target);
}
public static String substituteAll(String text,String source , String target) throws REException{
RE regularExpression = new RE(source);
return regularExpression.substituteAll(text,target);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment