Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3167

Find a variable length string between two strings

$
0
0

HI Experts,

 

 

I have a requirement where i have to fetch a sub-string of variable length between two substring in a string.

I have a string like this:

<MOABETR>amount</MOABETR>.

 

i need to fetch value of amount and length of amount can vary. Is there any way to do that?

 

IF i search for occurrence of <MOABETR> and get the offset and i add the length of it to that offset and start fetching value from there, i wouldn't be sure; how many characters to fetch because length of amount varies.

 

Thanks,

Dheeraj


Viewing all articles
Browse latest Browse all 3167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>