Zeichenkette nach Zeichen X entfernen

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Zeichenkette nach Zeichen X entfernen

Re: Zeichenkette nach Zeichen X entfernen

Post by Ragnar » 01 Apr 2020, 03:20

Code: Select all

; mit @
Clipboard := "[email protected]"
telnummer := StrSplit(Clipboard, "@")[1]
MsgBox % telnummer

; ohne @
Clipboard := "+4912345678"
telnummer := StrSplit(Clipboard, "@")[1]
MsgBox % telnummer

Zeichenkette nach Zeichen X entfernen

Post by GamerG1rl » 01 Apr 2020, 02:49

Huhu.

ich weiß leider nicht mehr, wo genau ich diese Funktion her habe... Aber irgendwie funktioniert sie nicht mehr :(

Code: Select all

   
string := Clipboard
   IfInString,String, @
   {   
      Loop, parse, string
      {
      If ( A_LoopField = "@")
	  telnummer .= A_LoopField
      Break
	  
      }
   }
   else
      telnummer := Clipboard
Der Ausgangswert der Clipboards ist [email protected] (als beispiel)
Es kann auch sein, dass eine normale nummer kommt +49123456789 - dann lässt er die Nummer normal durch (was auch funktioniert)
Leider komme ich selbst mit Wiki nicht auf den Fehler des Loops... :/

Top