in reply to Re: Re: use regex to split sentence
in thread use regex to split sentence

Try this:

@match = /X\d[^X]+/g;

Basically it slurps up everything that's not an 'X' after doing matching 'X\d'.

Replies are listed 'Best First'.
Re: Re: Re: Re: use regex to split sentence
by dyno (Initiate) on Nov 01, 2002 at 08:58 UTC
    thanks. in fact, it could be "X1XloveU".and I want it to be matched. this is just a simplified example about my work.
Re: Re: Re: Re: use regex to split sentence
by dyno (Initiate) on Nov 01, 2002 at 09:01 UTC
    in fact, 'X\d'could follow any string apart from 'X\d'. i.e.it could be "X1XXXIloveU". This is just a simplified example about my work. Any idea not let * eat all words followed?