1
# See bottom of file for license and copyright information
3
package Foswiki::Configure::Types::REGEX;
7
use Foswiki::Configure::Types::STRING;
9
use base 'Foswiki::Configure::Types::STRING';
12
my ( $this, $id, $opts, $value ) = @_;
13
$value = '' unless defined($value);
15
while ( $value =~ s/^\(\?-xism:(.*)\)$/$1/ ) { }
17
s/([[\x01-\x09\x0b\x0c\x0e-\x1f"%&'*<=>@[_\|])/'&#'.ord($1).';'/ge;
21
. '" type="text" size="55%" value="'
27
my ( $this, $value ) = @_;
28
while ( $value =~ s/^\(\?-xism:(.*)\)$/$1/ ) { }
33
my ( $this, $val, $def ) = @_;
34
if ( !defined $val ) {
35
return 0 if defined $def;
38
elsif ( !defined $def ) {
41
while ( $val =~ s/^\(\?-xism:(.*)\)$/$1/ ) {
43
while ( $def =~ s/^\(\?-xism:(.*)\)$/$1/ ) {
51
# Foswiki - The Free and Open Source Wiki, http://foswiki.org/
53
# Copyright (C) 2008 Foswiki Contributors. All Rights Reserved.
54
# Foswiki Contributors are listed in the AUTHORS file in the root
55
# of this distribution. NOTE: Please extend that file, not this notice.
57
# Additional copyrights apply to some or all of the code in this
60
# Copyright (C) 2000-2006 TWiki Contributors. All Rights Reserved.
61
# TWiki Contributors are listed in the AUTHORS file in the root
62
# of this distribution. NOTE: Please extend that file, not this notice.
64
# This program is free software; you can redistribute it and/or
65
# modify it under the terms of the GNU General Public License
66
# as published by the Free Software Foundation; either version 2
67
# of the License, or (at your option) any later version. For
68
# more details read LICENSE in the root of this distribution.
70
# This program is distributed in the hope that it will be useful,
71
# but WITHOUT ANY WARRANTY; without even the implied warranty of
72
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
74
# As per the GPL, removal of this notice is prohibited.