-2
I have some information I need that comes in the following format:
<http://informacaoquepreciso.com.br> "rel"="next"
In this case what I need to pick up only the text that is within the < >
, is there any function ready to take this kind of information? I was able to do using the replace
.
There is no function ready for this. In fact, it may even exist in some third-party library. Certainly not in the standard library. In general, you will always have to use a set of procedures to retrieve the information you want.
– Luiz Felipe
Thanks Felipe, only for information this information that I am picking up is the pagination return of a request that I am consuming, and to fetch the next page I have to get the url that is inside the <>. if you have any tips.
– Rodrigo Augusto Martins
Trivially, you can do so (assuming the string always has the question format, of course):
str[1:str.index('>')]
.– Luiz Felipe