使用JScript从字符串剪切 [英] cut from string using JScript

查看:65
本文介绍了使用JScript从字符串剪切的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个字符串:


/ sites / binaer / demo / fil / Winnie-the-Pooh 1024x768.jpg


如果我想在Winnie-the-Pooh 1024x768.jpg之前切一切,怎么会这样做?b / b
在VBScript中我能找到第一个 /"从句子的后面开始,并且

在此之前切断了所有内容,但我不知道如何在JScript中执行此操作...


字符串我想最终得到的是Winnie-the-Pooh 1024x768.jpg


任何想法?


解决方案

为什么要使用JScript来执行此操作?


-


问候


Steven Burn

Ur IT Mate Group
www.it-mate.co.uk


保持免费!

" Christopher Brandsdal" <峰; br ******* @ binaer.no>在留言中写道

新闻:#p ************** @ TK2MSFTNGP11.phx.gbl ...

我有这个字符串:

/ sites / binaer / demo / fil /小熊维尼1024x768.jpg

如果我想在Winnie-the-Pooh 1024x768.jpg之前剪切一切,如何
我会这样做?

在VBScript中我可以找到第一个/从句子的后面开始,并在此之前切断所有内容,但我不知道如何在JScript中执行此操作...

我想要最终得到的字符串是小熊维尼1024x768.jpg

任何想法??



因为其余的550行代码在这个.asp文档是在JScript中:)


认为在这种情况下最好使用JScript

" Steven Burn" < pv*@noyb.com> skrev i melding

新闻:e3 ************** @ TK2MSFTNGP09.phx.gbl ...

为什么你想要用JScript做这个吗?

-



Steven Burn
你的IT Mate Group
www.it-mate.co.uk

保持免费!

" Christopher Brandsdal" <峰; br ******* @ binaer.no>在消息中写道
新闻:#p ************** @ TK2MSFTNGP11.phx.gbl ...

我有这个字符串:

/ sites / binaer / demo / fil / Winnie-the-Pooh 1024x768.jpg

如果我想在Winnie-the-Pooh 1024x768.jpg之前剪切一切,怎么

我这样做了吗?

在VBScript中我可以找到第一个/从句子的后面开始,
并在此之前删除所有内容,但我不知道如何在
JScript中执行此操作...
我想要最终得到的字符串是Winnie-the-Pooh 1024x768.jpg

任何想法?




呵呵,很有道理; o)


你可能想看看以下内容;

http://www.activeserverpages.ru/iish.../htm/JStoc.htm <

http:// msdn .microsoft.com / library / en ... fjscriptlangua

gereference.asp
http://raqxtr.sstar.com/caspdoc/html..._reference.htm

http://17.webmasters.com/caspdoc/htm..._reference.htm


-


问候


Steven Burn

Ur IT Mate Group
www.it-mate.co.uk


保持免费!

" Christopher Brandsdal" <峰; br ******* @ binaer.no>在留言中写道

新闻:Od ************** @ TK2MSFTNGP11.phx.gbl ...

因为其余的550行这个.asp文档中的代码是用JScript编写的。

认为在这种情况下最好使用JScript

" Steven Burn" < pv*@noyb.com> skrev i melding
新闻:e3 ************** @ TK2MSFTNGP09.phx.gbl ...

为什么要使用JScript来做这个?

-



Steven Burn
你的IT Mate Group
www.it-mate.co.uk

保持免费!

" Christopher Brandsdal" <峰; br ******* @ binaer.no>在消息中写道
新闻:#p ************** @ TK2MSFTNGP11.phx.gbl ...

我有这个字符串:

/ sites / binaer / demo / fil / Winnie-the-Pooh 1024x768.jpg

如果我想在Winnie-the-Pooh 1024x768.jpg之前剪切一切,怎么

我这样做了吗?

在VBScript中我可以找到第一个/从句子的后面开始,并在此之前删除所有内容,但我不知道如何在JScript中执行此操作...
我想要最终得到的字符串是Winnie-the-Pooh 1024x768.jpg

任何想法?





I have this string:

/sites/binaer/demo/fil/Winnie-the-Pooh 1024x768.jpg

If I wanted to cut everything before Winnie-the-Pooh 1024x768.jpg, how would
I do this?

In VBScript I could find the first "/" from the back of the sentence, and
cut everything before that, but I''m not shore how to do this in JScript...

The string I want to end up with is Winnie-the-Pooh 1024x768.jpg

Any idea??


解决方案

Why do you want to use JScript to do this?

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Christopher Brandsdal" <br*******@binaer.no> wrote in message
news:#p**************@TK2MSFTNGP11.phx.gbl...

I have this string:

/sites/binaer/demo/fil/Winnie-the-Pooh 1024x768.jpg

If I wanted to cut everything before Winnie-the-Pooh 1024x768.jpg, how would I do this?

In VBScript I could find the first "/" from the back of the sentence, and
cut everything before that, but I''m not shore how to do this in JScript...

The string I want to end up with is Winnie-the-Pooh 1024x768.jpg

Any idea??



because the rest 550 lines of code in this .asp document is in JScript :)

Think it''s best to use JScript in this case
"Steven Burn" <pv*@noyb.com> skrev i melding
news:e3**************@TK2MSFTNGP09.phx.gbl...

Why do you want to use JScript to do this?

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Christopher Brandsdal" <br*******@binaer.no> wrote in message
news:#p**************@TK2MSFTNGP11.phx.gbl...

I have this string:

/sites/binaer/demo/fil/Winnie-the-Pooh 1024x768.jpg

If I wanted to cut everything before Winnie-the-Pooh 1024x768.jpg, how


would

I do this?

In VBScript I could find the first "/" from the back of the sentence, and cut everything before that, but I''m not shore how to do this in JScript...
The string I want to end up with is Winnie-the-Pooh 1024x768.jpg

Any idea??




hehe, good reason ;o)

You may want to take a look at the following;

http://www.activeserverpages.ru/iish.../htm/JStoc.htm

http://msdn.microsoft.com/library/en...fjscriptlangua
gereference.asp

http://raqxtr.sstar.com/caspdoc/html..._reference.htm

http://17.webmasters.com/caspdoc/htm..._reference.htm

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Christopher Brandsdal" <br*******@binaer.no> wrote in message
news:Od**************@TK2MSFTNGP11.phx.gbl...

because the rest 550 lines of code in this .asp document is in JScript :)

Think it''s best to use JScript in this case
"Steven Burn" <pv*@noyb.com> skrev i melding
news:e3**************@TK2MSFTNGP09.phx.gbl...

Why do you want to use JScript to do this?

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
"Christopher Brandsdal" <br*******@binaer.no> wrote in message
news:#p**************@TK2MSFTNGP11.phx.gbl...

I have this string:

/sites/binaer/demo/fil/Winnie-the-Pooh 1024x768.jpg

If I wanted to cut everything before Winnie-the-Pooh 1024x768.jpg, how


would

I do this?

In VBScript I could find the first "/" from the back of the sentence, and cut everything before that, but I''m not shore how to do this in JScript...
The string I want to end up with is Winnie-the-Pooh 1024x768.jpg

Any idea??





这篇关于使用JScript从字符串剪切的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆