| |
|
|
Nico Madysa | ex XProfan10 there whom commands Match$, with the examined becomes, whether a Sting one designed pattern corresponds to, means z.B. first one capital comes, then 3 lower case, one space and thereafter 3 Digits. I have here some assembled with a small Beispielprogramm: CompileMarkSeparationDef $Name "[A-ZÄÖÜ]([a-zäöü]+|~.)(~-[A-ZÄÖÜ]([a-zäöü]{2,}|~.))* [A-ZÄÖÜ]([a-zäöü]+|~.)(~-[A-ZÄÖÜ]([a-zäöü]{2,}|~.))*"
Def $Time "((0|1|)[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?"
Def $Vorw "[1-9][0-9]{1,4}"
Def $Telnum "[1-9][0-9]{4,7}"
Def $Url "(https://)?(www~.)?[^@|²³.]{1,}(~.[^@|²³ .]{2,3}){1,3}"
Def $Street "([A-Z][a-z]{2,}~.? )+(0[1-9][0-9]*|[1-9][0-9]*)"
Def $Plz "[0-9]{5} [A-Z][a-z]{2,}"
Def $RoemM "M*"
Def $RoemC "(C[DM]|C[DM]|D?C{0,3})?"
Def $RoemX "(X[LC]|X[LC]|L?X{0,3})?"
Def $RoemI "(I[VX]|I[VX]|V?I{0,3})?"
Declare E& , T& , Roem$ , Addr$ , Tel$ , XTel$
Roem$ = "^" + $Roemm + $Roemc + $Roemx + $Roemi + "$"
Addr$ = "^" + $Name + "(
|[,;] )" + $Street + "(
|[,;] )" + $Plz + "$"
Tel$ = "^(0"+$Vorw+"/)?"+$Telnum+"$"
XTel$ = "^((~+49 ("+$Vorw+"|~(0"+$Vorw+"~))|0049 "+$Vorw+"|~(0049 "+$Vorw+"~)|0"+$Vorw+"|~(0"+$Vorw+"~)) )?"+$Telnum+"$"
+49 30 12345678
+49 (030) 12345678
0049 30 12345678
(0049 30) 12345678
030 12345678
(030) 12345678
12345678
Window 300 , 200 - 200 , 200
Cls External("User32","GetSysColor",15)
E& = Create("MultiEdit",%Hwnd,"",5,05,180,(-20))
T& = Create("Text",%Hwnd,"",5,30,180,160)
Whilenot IsKey(27)
Waitinput
Match$(XTel$,Gettext$(E&))<- Addr$ durch zu testende Konstante/Variable ersetzen
If %Matchpos >= 0
Settext T& , $Match
Else
Settext T& , "ungültig"
Endif
Wend
$name = First name + Surname Doppelnamen are through hyphen possible $time = hh:mm or hh:mm:ss $URL = Internetadresse, z.B. [...] unfortunately too www.de $Street = Straßenname + House Number, z.B. Str. the Friedens 1 $PLZ = postcode + place, z.B. 02979 Burghammer Roem$ = Römischess Zahlzeichen, z.B. CXVII Addr$ = complete address, through Chr$(13), comma or Semikolon separated. ph$ = Festnetznummer, too with Vorwahl possible, z.B. 011111/99999 XTel$ = erweiterte Festnetznummer, following Formate are possible: +49 30 12345678 +49 (030) 12345678 0049 30 12345678 (0049 30) 12345678 030 12345678 (030) 12345678 12345678 review and opinion are particularly erwünscht. |
|
|
| |
|
|
|
Clemens Meier | PLZ always with of/ one 0 beginnend? Schade, my town becomes impossible |
|
|
| |
|
|
|
Michael Wodrich | TelefonNr is not: 0451/...
because[quote:fa121d580d] Capture 0 Any character in 1-9 Exactly 5 times / End Capture ? (zero or one time) Any character in 1-9 Exactly 5 times [/quote:fa121d580d] url goes neither
[quote:fa121d580d]Capture [...] End Capture ? (zero or one time) Capture www~ . (any character) End Capture ? (zero or one time) Any character hardship in @|²³~~~. + (one or more times) ~ . (any character) Any character hardship in @|²³~~ At least 2, but hardship more than 3 times Capture ~ . (any character) Any character hardship in @|²³~~ At least 2, but hardship more than 3 times End Capture ? (zero or one time) [/quote:fa121d580d] an so on
PLZ
[quote:fa121d580d]0 Any character in 1-9 Exactly 4 times (space) Any character in A-Z Any character in a-z At least 2 times [/quote:fa121d580d] controlled with The Regulator - free Version
[...] [...] |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 06/10/06 ▲ |
|
|
|
|
Nico Madysa | So I be already time happy, that with whom römischen numbers no Error emerged are.(The having me almost into WAHNSINN driven!). [quote:9180e9b2ca] PLZ always with of/ one 0 beginnend? Schade, my town becomes impossible [/quote:9180e9b2ca] Sorry, i'm of it gone out, PLZs begännen fundamentally with of/ one 0.
[quote:9180e9b2ca] TelefonNr is not: 0451/... [/quote:9180e9b2ca] the same in green. into minutes the Zusammenschreibens went I like this from, Vorwahlen hätten fundamentally 5 Digits.(I had simply one shelf before the head.)
@ Michael: your Regulator berücksichtigt not, that into regülären squeeze out of XProfan the Tilde(~) the Escape-characters is and not the Backslash(). With me is url functions, irrespective the Macke, that too w w w . d e as URL durchgeht. (I have w w w . d e blocked, lest instead this [...] displayed becomes.)
here's now a revised Version: CompileMarkSeparationDef $Name "[A-ZÄÖÜ]([a-zäöü]+|~.)(~-[A-ZÄÖÜ]([a-zäöü]{2,}|~.))* [A-ZÄÖÜ]([a-zäöü]+|~.)(~-[A-ZÄÖÜ]([a-zäöü]{2,}|~.))*"
Def $Time "((0|1|)[0-9]|2[0-3]):[0-5][0-9](:[0-5][0-9])?"
Def $Tel "(0[1-9][0-9]{2,3}/)?[1-9][0-9]{6}"
Def $Url "(https://)?(www~.)?[^@|²³~~~.]{1,}(~.[^@|²³~~~.]{2,3}){1,3}"
Def $Street "([A-Z][a-z]{2,}~.? )+(0[1-9][0-9]*|[1-9][0-9]*)"
Def $Plz "[0-9]{5} [A-Z][a-z]{2,}"
Def $Roemm "M*"
Def $Roemc "(C[DM]|C[DM]|D?C{0,3})?"
Def $Roemx "(X[LC]|X[LC]|L?X{0,3})?"
Def $Roemi "(I[VX]|I[VX]|V?I{0,3})?"
Declare E& , T& , Roem$ , Addr$
Roem$ = "^" + $Roemm + $Roemc + $Roemx + $Roemi + "$"
Addr$ = "^" + $Name + "(
|[,;] )" + $Street + "(
|[,;] )" + $Plz + "$"
Window 300 , 200 - 200 , 200
Cls External("User32","GetSysColor",15)
E& = Create("MultiEdit",%Hwnd,"",5,05,180,(-20))
T& = Create("Text",%Hwnd,"",5,30,180,160)
Whilenot Iskey(27)
Waitinput
Match$(Addr$,Gettext$(E&))<- Addr$ durch zu testende Konstante/Variable ersetzen
If %Matchpos >= 0
Settext T& , $Match
Else
Settext T& , "ungültig"
Endif
Wend
EDIT: have now this Posting edited, I because of one Error not yet everything again reinstellen wished. thanks on Clemens for Richtigstellung of my Review of phone numbers. ;D |
|
|
| |
|
|
|
Clemens Meier | already at Überfliegen anew a Error seen with the phone number. The Vorwahl 07402 would to your expression you don't say so.
correctly., The 0 standing on first place. on 2. place 1-9, thereafter numbers of 0-9
must means whom expression yet something strain.
with the Hauptanschluß analog, on first place 1-9, thereafter numbers of 0-9:
Def $ph (0[1-9]{3,4}/)?[1-9]{5} is means wrong (and To short hinten, my fit there already not mere) correctly. or to that mindest rather: Def $ph (0[1-9][0-9]{2,3}/)?[1-9][0-9]{6}
further possible Error can now too others search |
|
|
| |
|
|
|
| following Angabemöglichkeiten for phone numbers are typical:
I take now times the Berliner Vorwahl 030
+49 30 12345678 +49 (030) 12345678 0049 30 12345678 (0049 30) 12345678 030 12345678 (030) 12345678 12345678
Oft genutzte Sonderzeichen in Teleangaben sind +-()[] /. |
|
|
| |
|
|
|
Clemens Meier | The 4. Variante knew I do not. but altogether a good Ansatz circa a kompletten expression To formulieren. |
|
|
| |
|
|
|
| [quote:926ddf29a9=Clemens Meier]The 4. Variante knew I do not. but altogether a good Ansatz circa a kompletten expression To formulieren.[/quote:926ddf29a9] you have already right - The 4. Variant sooner seldom, but present: [...] |
|
|
| |
|
|
|
RGH | Also setting itself increasingly The international spelling with hyphen through:
+49-30-1234567 +4930-1234567
or quite without any Separator (becomes gladly too with Handynummern akin):
+49301234567
not To forget The versions with 00 instead of +.
best ought to one space, Bindestriche and clinging simply ausfiltern. it could Yes with Nenenstellenanlagen yet further Bestandteile follow:
+49-30-123456-78
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 06/12/06 ▲ |
|
|
|
|
Michael Wodrich | have at Regulator well not konvertiert??!?
but the can Yes by hand nachholen. with the check falls incidentally on, the one not whom rounds clinging so herumwerfen ought to. The having namely a integrally klare Own function.
The regulären expressions means Please without The rounds clinging.
Best wishes Michael Wodrich |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 06/13/06 ▲ |
|
|
|
|
Clemens Meier | [quote:3a4ca13962=Michael Wodrich] The regulären expressions means Please without The rounds clinging. [/quote:3a4ca13962] understand I do not, how can one reguläre expressions without round clinging create. The are a absolutes must circa so-called Subpattern to make up. |
|
|
| |
|
|
|
Michael Wodrich | correctly., the name fell I do not so quick one... |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 06/13/06 ▲ |
|
|
|