[ASP] replace alle letters met niks

Pagina: 1
Acties:

  • Dr.Dokter
  • Registratie: Januari 2001
  • Laatst online: 30-07 11:20
Is er een handige manier om met replace alle letters uit een string te halen. Zoiets als
str = replace(str,<A-Z,a-z>,"")
?

  • Tsjipmanz
  • Registratie: Oktober 2000
  • Laatst online: 13-05 14:52

Tsjipmanz

Der Rudi ist da

Probeer s wat je daar hebt zou ik zeggen, lukt dat niet, kan je altijd weer ff verder kijken!

There's no such thing as a mistake, just happy accidents - Bob Ross
Relaxte muziek: altijd okee!
- Soulseek rulez -


  • Dr.Dokter
  • Registratie: Januari 2001
  • Laatst online: 30-07 11:20
werkt dus niet...

  • mulder
  • Registratie: Augustus 2001
  • Laatst online: 14:51

mulder

ik spuug op het trottoir

str = Replace(str, " ", "")
ofzo.

oogjes open, snaveltjes dicht


  • Basszje
  • Registratie: Augustus 2000
  • Laatst online: 21:24

Basszje

Reisvaap!]

Kijk eens naar Regex'en onder ASP.

Beware of listening to the imposter; you are undone if you once forget that the fruits of the earth belong to us all, and the earth itself to nobody.


  • Dr.Dokter
  • Registratie: Januari 2001
  • Laatst online: 30-07 11:20
Ik heb dit maar gedaan:
code:
1
2
3
4
5
6
str = "A1234-123e4"
a = 58
do while a < 255
str = replace(str,Chr(a),"")
a = a + 1
loop

werkt ook ;)

  • KoeKk
  • Registratie: September 2000
  • Laatst online: 30-08 21:36
maar het is niet echt handig ;)

ASP regexp object

Verwijderd

Jaja, dat wordt Regular Expressions gebruiken. Dan kan je gewoon een pattern over je string laten lopen en alles weghalen wat je maar wilt.

Dit is gewoon een FlitsyBatsu oplossing.
Pagina: 1