Robert Raps wrote:I try to use next pattern "<<([.*&&[^<]])>".
Steve's pattern is probably what I would have chosen too; but what you tried suggests that you also want to eliminate the situation where you encounter three "<"s in a row, so you could try: <<([^<>]*)>.
Note that this will return an empty group if it encounters <<>. It also won't work if you can have tags embedded inside <<...>.
Basically, regexes are NOT suited for tag parsing unless what you need is very simple.
Robert Raps wrote:There is string for search "<<23423gd=,4><<233w,4234>"
I need to select every entry between << and >
I try to use next pattern "<<([.*&&[^<]])>".
Also, from the post, it looks like the OP is under the impression that qualifiers work in character classes -- which of course, it does not. How can it? Character classes are used to specify for a single character, there is no such a thing as "zero or more" of "one" character.
Ramesh Pramuditha Rathnayake wrote:As Robert wants every entry between << & > I don't think <<([^<>]*)> is good. It's because this gives "<<234<23gd=,4>" no result.. But here "234<23gd=,4" is between << and >
Well if it's in HTML and it's a logical expression, then I would expect the generator to use the proper entity ('<').
So, how would you propose to deal with "<<234>23gd=,4>" (if such an animal exists)?
This is just one of the reasons why, as I said before, regexes are not suited to parsing MLs.
But regex does not support for that as I think. And I don't know a way to extract them.
And for the main question too, there are 3 answers..
As Winston said, I also don't think that regexes are not suited for this..