I'd like to find all occurrences of strings in a long string which are placed between a set of two specific strings.
For eg.
String s = "abcdText('hello')abcd efghText('world')";
The regex pattern of strings would be Text(
and '
and the results should be the List of strings enclosed between the pattern. Hence the expected output should be:
[hello, world]
After some searches, I found this . This explains my use case but it is in PHP and only meant to find digits.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.