1
2
3
4
if( $housenumber =~ /[A-Za-z]/i ) {
$flag_reportit = 1;
print $housenumber." -> reported\n";
}
Quote102a -> reported
**********************************
16b -> reported
**********************************
60a -> reported
**********************************
16c -> reported
**********************************
16a -> reported
**********************************
91 - Tesdorpf-Haus -> reported
**********************************
16d -> reported
2013-08-06T09:26:47 MuffiDeine regex sagt: Wenn Buchstaben drin sind schreibs hin. Macht sie doch.
Sogar mit Gross-Kleinschreibung doppelt sicher ;)
1
2
3
4
5
6
if( $housenumber =~ /[A-Z]/i ) {
$flag_reportit = 1;
print $housenumber." -> reported\n";
} else {
print $housenumber." -> nicht reported\n";
}
Quote38 -> nicht reported
66 -> nicht reported
6 -> nicht reported
25 -> nicht reported
28 -> nicht reported
14 -> nicht reported
86 -> nicht reported
if( $housenumber =~ /[A-Za-z]/i ) {
if( $housenumber =~ /[A-Za-z]/ ) {
^\d+(?:(?:\s*[A-Za-z\s-]+)|(?:\s*-\s*\d+))?(?:\s*\/\s*\d+)?$
if( $housenumber =~ /^\d+(?:(?:\s*[A-Za-z\s-]+)|(?:\s*-\s*\d+))?(?:\s*\/\s*\d+)?$/ ) {
Quote91 - Tesdorpf-Haus
if( !$housenumber =~ /^\d+(?:(?:\s*[A-Za-z\s-]+)|(?:\s*-\s*\d+))?(?:\s*\/\s*\d+)?$/ ) {
Quote//9-10
Quote11a-11b
11a+11b
30c2