3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by C:\>
1

You can do this kind of thing using the indexOf and substring methods of the String class. So myUrlAsString.indexOf("secret_code=") gives the start point of that string, add 12 to get the index of the first char after it, which is where your target text is located. Use the same approach to find the end of your target (either the end of the URL string, or an "&" maybe?). Then use substring to pick out the text between those two indexes.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.