I am using the following regex to determine the next word found after a certain marker:
(?<=marker:\W{1})(\w+)
How can this be updated to determine the next 8 characters after the marker, including space, or other special chars like - or /
Thanks,
Alex
Source looks like this:
test : 1205
no.: abc
marker: 12345678
something: xxx
and I require 12345678
Use
.instead of\win your capturing group and use another quantifier: