It's getting towards the end of the day and this is annoying me - one day I'll find the time to learn regex properly as I know it can save a lot of time when extracting info from text.
I need to match strings that match the following signature:
6 spaces followed by up 31 alphanumerics (or spaces) and then no more alphanumeric text on that line.
E.g.
' sampleheading ' - is fine ' sampleheading 10^21/1 ' - should not match ' sampleheading sample ' - should not match
I've got ^(\s{6}[\w\s]{1,31})
matching the first bit correctly I think but I can't seem to get it to only select lines that don't have any text following the initial match.
Any help appreciated!
Edit:
I've updated the text as a number of you noted my hastily entered original samples would actually all have tested fine.