...

View Full Version : JavaScript Regular expression



ppraj
08-08-2010, 10:02 AM
Given an input string, I would like to get the output from this in the specified format: filename;path.

For the input string:

/vob/TEST/.@@/main/ch_vobsweb/1/VOBSWeb/main/ch_vobsweb/4/VobsWebUI/main/ch_vobsweb/2/VaultWeb/main/ch_vobsweb/2/func.js

I expect this output string:

func.js;VOBSWeb/VosWebUI/VaultWeb/func.js

The filename is listed at the end of the whole string, and its path is supposed to be stripped using the characters after each numeric value (eg. /1/VOBSWeb/ and then /4/VobsWebUI and then /2/vaultWeb)

dniwebdesign
08-09-2010, 07:38 AM
That's nice... I'd like that too...
What code do you have so far?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum