Re: [racket-users] The regex and me...

2016-11-05 Thread David Storrs
On Sat, Nov 5, 2016 at 10:00 AM, wrote: > > Hi David, > > thanks for your reply ! :) > > SUPER! THAT helps! > > Is this kinda "pattern", that > if 'function' does something once, there is a > 'function*' that does the same thing multiple times? > > Cheers > Meino > > It depends on your definition

Re: [racket-users] The regex and me...

2016-11-05 Thread Meino . Cramer
Hi David, thanks for your reply ! :) SUPER! THAT helps! Is this kinda "pattern", that if 'function' does something once, there is a 'function*' that does the same thing multiple times? Cheers Meino David Storrs [16-11-05 14:37]: > (regexp-match* #px"(AA.+?AA)" str) > > > regexp-match*

Re: [racket-users] The regex and me...

2016-11-05 Thread David Storrs
(regexp-match* #px"(AA.+?AA)" str) regexp-match* matches multiple times through the string. As with Perl and pcre in general, a trailing '?' makes quantifers non-greedy. On Sat, Nov 5, 2016 at 8:59 AM, wrote: > Hi Jens, > > thanks for your reply! :) > > ...hmmm...I /think/ I understand the

Re: [racket-users] The regex and me...

2016-11-05 Thread Meino . Cramer
Hi Jens, thanks for your reply! :) ...hmmm...I /think/ I understand the mechanism now...but if it is as it seems to be...I run into another problem. Suppose your have a long line of character with groups of certain chararcter and random caharcters in between. Something like this SHDKJSHKDAHSKJD

Re: [racket-users] The regex and me...

2016-11-04 Thread Jens Axel Søgaard
The first result string is the first matched string. The second result is what was matched by the sub expression in the parenthesis. > Den 4. nov. 2016 kl. 20.04 skrev meino.cra...@gmx.de: > > Hi, > > Normally I would tend to think, that I am > quite familiar with regex and their usage > (bac

[racket-users] The regex and me...

2016-11-04 Thread Meino . Cramer
Hi, Normally I would tend to think, that I am quite familiar with regex and their usage (background: UNIX?Linux, sed, vi/vim, Perl...) Then I played a little with regex-match...and I have to go to school again..,, >From the Racket guide: > (regexp-match #rx"([a-z ]+;)*" "lather; rinse; repeat;"