开发者

Javascript pattern matching

In a string if we k开发者_JAVA技巧now a start point .how to find the end string using js or jquery

   var helper="$var_1__ee$var_2__ee";

    $var is the starting point and the end string pattern is ee

  How to split the string based on this pattern


Regular expressions will be useful here

helper.match(/$var[^$]*ee/)

To provide a more detailed answer you need to tell us what are you trying to extract from this string.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜