| |
|
|
- Page 1 - |
|
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. |
|
|
| |
|
|
|
| |
|
- Page 1 - |
|
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 ▲ |
|
|
|
| |
|
- Page 2 - |
|
|
Nico Madysa | Hossa, Torsten having right. with one small Langeweile-shred can apparently a large Discussion trigger! |
|
|
| |
|
|
|
Clemens Meier | were ex, To XProfan 10 official showed up is. Then iF one own Forum for reguläre expressions open must. (The to be nuts still, The Programmer) |
|
|
| |
|
|
|
Nico Madysa | so, have The thing now machine. but not $ph have I now ph$ and XTel$ (extended telephon number). ph$ is in the stature (Vorwahl/)number, XTel$ untersützt following Formate: +49 30 12345678 +49 (030) 12345678 0049 30 12345678 (0049 30) 12345678 030 12345678 (030) 12345678 12345678
@Clemens: In ph$ must The first digit the Vorwahl a 0 his, this is namely The so-called Verkehrsausscheidungsziffer, with the Ferngespäche of Ortsgesprächen distinguished go. Anrufe in others countries must with two nobodies begin (in Nummernangaben too with +), where The zero the Vorwahl wegfällt.
friday I will wohld en new code reinstellen. Have it strain Nich thereby ... |
|
|
| |
|
|
|
Clemens Meier | [quote:b9be02c293=Nico Madysa] @Clemens: In ph$ must The first digit the Vorwahl a 0 his, this is namely The so-called Verkehrsausscheidungsziffer, with the Ferngespäche of Ortsgesprächen distinguished go. Anrufe in others countries must with two nobodies begin (in Nummernangaben too with +), where The zero the Vorwahl wegfällt.[/quote:b9be02c293] this is so far correctly., have never something other behauptet. |
|
|
| |
|
|
|
Nico Madysa | have so did i not written. wished The information only given having. |
|
|
| |
|
|
|
Nico Madysa | now Yes ... ähm ... hörtmazu, jolly ... story ... me having my computer something strange Geräusche made. there have the part heruntergefahren, my 10-tons-Röhrenbildschirm abgestöpselt and on my bed set, The wrap of my computers abgenommen. See there, the ventilator was right verstaubt. I So the part abgestaubt, integrally softly-softly naturally, too time short reingepustet. means det part abgestaubt, PC-wrap again raufgeklippt, 10-tons-Röhrenbildschirm again draufgestellt(No, I have none Tower), again everything beautiful zusammengetüddelt, angeschalten wonderful. ... To windows launched is. Sobal the (by me Standart-green) Desktop showing should, becomes everything Black. and there power the disks-Ansteuerung right heavy. I custom now no Tipps, of it have I already enough, what about me have already the Match$-Program new written. anyway I have $ph rausgefeuert, instead have I $Vorw and $Telnum. And then two Vaiablen ph$ and XTel$. ph$ unktioniert How before means 0Vorwahl/number , or. number .and XTel accepted following indicated: +49 30 12345678 +49 (030) 12345678 0049 30 12345678 (0049 30) 12345678 030 12345678 (030) 12345678 12345678 around the thing here something kürzer To hold, have I simply whom first Posting edited, there is means the new Code find. plenty Fun at Error search/find. |
|
|
| |
|
|
|
Nico Madysa | Nanü? three versions and already perfect? or have I mean Error so well cache, that The nobody finds? |
|
|
| |
|
|
|
Michael Wodrich | look you still times under whom code-Snippets whom RegEx-Tester on.
Definiere all kinds of and impossible Inputs and teste tappt im dunkeln so through.
you mußt only mind that I there The Escapesequenzen off have...
Best wishes Michael Wodrich |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 06/24/06 ▲ |
|
|
|