Start a new topic

REGEX Java regular expression all characters between angle brackets

I'm editing a TMX file in CafeTran and I'm looking for the Java regular expression that matches all characters between angle brackets (< and >), non-greedy, inside segments.


So, for square brackets this expression works:


\[(.*?)\]


All matches are highlighted green in the project segments pane.


However, transposed to the angle brackets, this expression doesn't work:


\<(.*?)\<


Nor does this one:


\\<(.*?)\\<


How come?


Typo!


\<(.*?)\<


Must of course be:


\<(.*?)\>

For the time being I can replace < with { and > with } and use \{(.*?)\}, but this has to be solved of course.

Can anyone provide the correct syntax? How to search for
Can anyone provide the correct syntax? How to search for smaller than sign with regex checked? \ plus the smaller than sign doesn't do the trick. Is this a CafeTran quirk?--just had to repost this because of the fresh desk editor taking smaller than literally

Try <[^>]+>



No guarantee for CT. I don't use regexes in CT.


H.

I very much appreciate your attempt, Hans, but the issue is in the greater than and lesser than character. Escaping them doesn't work.

Yes, please?
Login to post a comment