PDA

View Full Version : :: what does this mean? ::


babelfish
10-15-2002, 12:06 PM
<option value="\d{3}">**Any**</option>

saw it on a script i wanna use but i dont understand why its used...

the page also uses a 'new ActiveXObject ("Scripting.FileSystemObject")' and a .transfer. method.

any ideas would be great

jolietjake
10-15-2002, 12:50 PM
Well, not sure, but seems a mask that permits any number between 000-999

babelfish
10-15-2002, 01:07 PM
that would make sense since it is grabbing files named 001_002_003_filename from a directory

is there any info on how this works? as i want to alter this to read aaa_bbb_ccc (basically changing the numbers to letters)

thx m8..

Roelf
10-15-2002, 01:38 PM
'new ActiveXObject ("Scripting.FileSystemObject")'
creates an active-x object which give access to the clients filesystem (if active-x objects are enabled in the browser). such an object can be used to read and write files on the client. My experience with filesystemobjects is limited to the serverside objects in ASP. never worked with client side filesystemobject. perhaps they work the same, but dont know for

babelfish
10-15-2002, 01:51 PM
yeah - it gives access to read from a designated directory on your PC - then a select box with <option value="\d{3}">**Any**</option> in it compiles a list - its a bit over my head really ;)

i just wanted more info on the \d{3} bit... anyone got any links?

jolietjake
10-16-2002, 08:35 AM
Well, I was not sure because it wasn't javascript syntax , so if it is active x syntax... better try other forum.

I cannot help you (I think), I lean about masks in this javascript page... in spanish (I'm from Spain :D ) but I think that its easy to understand. :thumbsup:
http://www.ciudadfutura.com/javascriptdesdecero/jsgram/expregulares.htm



JolietJake- Master of Blues & Rythm :cool:

glenngv
10-16-2002, 08:42 AM
you should post the code that uses that option value \d{3}

joh6nn
10-16-2002, 09:47 PM
i'm with glenn. can we see the whole script?

whammy
10-17-2002, 12:39 AM
I would think (having used Scripting.FileSystemObject a bit, and regular expressions), that this:

\d{3}

...which is a simple regular expression match for 3 digits, i.e.:

\d = is a digit
{3} = exactly 3 occurences of the previous pattern (so, exactly 3 digits)...

...is used to grab all files that match that regular expression (any files that have a 3 digit filename, perhaps before the extension? It really does depend on how it's used!), after passing the value to the script.

;)

babelfish
10-21-2002, 09:01 AM
cant post the script as its not hosted anywhere - its meant to run off a cd

the actual files are called NNN_NNN_NNN_filename

where N is a number