Hi,
So if I have a string for example str='ac-t-c-t-g'
and I want to extract the substring containing 4 characters
starting from the beginning without carrying how many '-' characters are in between. SO in this case it will be 'ac-t-c'. In another example str='a----c-tg-ggg' it will be
'a----c-tg'.
I was wondering if you could do it using a regular expression rather than for loop?