ScoobyNet.com - Subaru Enthusiast Forum

ScoobyNet.com - Subaru Enthusiast Forum (https://www.scoobynet.com/)
-   Computer & Technology Related (https://www.scoobynet.com/computer-and-technology-related-34/)
-   -   ASP / VB ASSISTANCE PLEASE (https://www.scoobynet.com/computer-and-technology-related-34/214077-asp-vb-assistance-please.html)

rik1471 28 May 2003 04:17 PM

If I have a string "Vulnerability1" which currently reads "Absence of Personnel, Improper Disposal of Media - i.e. disposal of media which hasnt been wiped clean, Inadequate Recruitment Procedures" and I want to strip the "Absence of Personnel, " off it and leave variable "Vulnerability2" to read "Improper Disposal of Media - i.e. disposal of media which hasnt been wiped clean, Inadequate Recruitment Procedures" how would you do it?


My best attempt:

vulnerability2 = right(vulnerability1,instr(vulnerability1,"Absence of Personnel, "))


ChrisB 28 May 2003 04:23 PM

vulnerability2 = "Improper Disposal of Media - i.e. disposal of media which hasnt been wiped clean, Inadequate Recruitment Procedures"

:D

rik1471 28 May 2003 04:38 PM

Sorry, the variable changes :p - God! I thought this was a mature forum ;)

markr1963 28 May 2003 04:44 PM

LOL @ Chris

How about this...

vunerability2: Right([vunerability1],Len([vunerability1])-InStr([vunerability1],",")-1)


rik1471 28 May 2003 04:50 PM

This gives error:

Error Type:
Microsoft VBScript compilation (0x800A0414)
Cannot use parentheses when calling a Sub
/new_cit/risk/exploits/exploits1.asp, line 51, column 87

markr1963 28 May 2003 04:53 PM

Try it without the square brackets (needed 'em in the Access query from whence it came)

Mark

rik1471 28 May 2003 04:55 PM

I removed the square brackets, and replaced the : for a = and it errors:

Error Type:
Microsoft VBScript runtime (0x800A0005)
Invalid procedure call or argument: 'Right'
/new_cit/risk/exploits/exploits1.asp, line 51

markr1963 28 May 2003 04:57 PM

How about right$ instead of right?

Mark


All times are GMT +1. The time now is 09:06 AM.


© 2024 MH Sub I, LLC dba Internet Brands