Removing whitespace

How can I remove all whitespace entered by a user from an input box (ie card number)

numero = 48
interpreted = N
texte =
[grep search=[^0-9]&replace=][card][/grep]
In this case, [^0-9], including the square brackets, is a grep expression. A grep bracket expression is a list of characters enclosed by [ and ]. It matches any single character in that list; if the first character of the list is the caret ^ then it matches any character not in the list. So in this case, grep will strip out anything that is not a digit.
[grep search=[^0-9]&replace=][card][/grep]


In this case, [^0-9], including the square brackets, is a grep expression. A grep bracket expression is a list of characters enclosed by [ and ]. It matches any single character in that list; if the first character of the list is the caret ^ then it matches any character not in the list. So in this case, grep will strip out anything that is not a digit. Bill

DOWNLOAD WEBDNA NOW!

Top Articles:

WebDNA Modules

A list of the currently available modules...

Download WebDNA Applications

WebDNA applications...

WebDNA reference

...

WebDNA Libraries

A list of available libraries for WebDNA...

Tips and Tricks

A list of user-submitted tips ...

[biotype]

BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...

Related Readings:

Setting a 30-minute Cookie

Configuring the expires time for a short-term cookie is tricky...

ImageMagick

Use ImageMagick to manipulate images when you upload them...

How many working days?

This small script finds the number of working days between two dates...

Using a simple Array of Variables with [interpret]

The [interpret] context is very powerful command in the hands of a skilled WebDNA programmer...

Handling credit card numbers

Encrypting the credit card numbers does the job quite nicely...

How to keep the text variable after a function has finished

By default...