Vampire
03/10/2021, 12:46 PMfind(input, 50)
to search after character 50 but so that only until character 50 is tried to match.
And what is the difference between slice
, substring
and subSequence
?edrd
03/10/2021, 1:59 PM^.{50}(your-match)
Vampire
03/10/2021, 2:39 PMVampire
03/10/2021, 2:39 PMfind(input, 50)
edrd
03/10/2021, 2:51 PMedrd
03/10/2021, 2:52 PMVampire
03/10/2021, 2:52 PMVampire
03/10/2021, 2:53 PMfind(input, 50)
also does not create a substring and does exactly the same as your suggestionVampire
03/10/2021, 2:53 PMedrd
03/10/2021, 2:55 PMedrd
03/10/2021, 3:03 PMedrd
03/10/2021, 3:10 PMedrd
03/10/2021, 3:10 PMedrd
03/10/2021, 3:11 PMPattern.compile("your-pattern").matcher(stringToMatch).region(0, 50).find()
Vampire
03/10/2021, 3:11 PMedrd
03/10/2021, 3:12 PM