开发者

Get the value between slashes

<block4>
    <tag>
        <name>72</name>
        <value>/BNF/RED-AAF-US EQUITY GROWTH FUND //FETA/ABNAAFU000000D93--16.560-10/</value>
    </tag>
</block4>

i need output like FETA from the entire tag

i have did in xslt lik way but it ws getting fully after //

<xsl:for-each select="block4/tag[name = '72']">
    <xsl:value-of select="
        concat((concat(
        substringafter(value,'//'),'')),
        substringbefore(value,'/'))
        "/>
</xsl:for-each>,<xsl:text/>开发者_运维技巧 


Give this a try:

substring-before(substring-after(value,'//'),'/')

EDIT

@bluish how can i get this value ABNAAFU000000D93--16.560-10

I guess it's a new question. So here you have:

substring-before(substring-after(substring-after(value,'//'),'/'),'/')

I hope you've learnt the concepts behind these solutions. Take a look at this good and simple reference.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜