# Re: Odd behavior of String#scan

**URL:** <https://www.ruby-forum.com/t/re-odd-behavior-of-string-scan/74265>\
**Category:** Ruby\
**Created:** [December 21, 2005, 11:11pm UTC](https://www.ruby-forum.com/t/re-odd-behavior-of-string-scan/74265 "2005-12-21T23:11:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BergerS\_Daniel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/bc8723/32.png) [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Post date:** [December 21, 2005, 11:11pm UTC](https://www.ruby-forum.com/t/re-odd-behavior-of-string-scan/74265/1 "2005-12-21T23:11:52Z")

</div>

> > to:  
> > But this does two operations where it seems like one should  
> > suffice. Does someone know of a way to do this in a single  
> > operation?
> 
> I would suggest:
> 
> ‘abcSTARTdef,ghi,jkl,ENDmno’.match(/START(.\*)END/)[1].split(’,’)
> 
> I don’t know of a way to accomplish it in one step.

I don’t think it’s possible without lookbehind assertions. Maybe  
Oniguruma supports this.

Regards,

Dan
