I need to extract from a string a set of characters (TEXT1 / TEXT2 / TEXT3) which are included between two delimiters, without returning the delimiters themselves, nor the preceding or ending spaces.
My strings look like this:
- TEXT1 | characters
- digits.digits - TEXT2 | characters
- characters - digits digits-digits-digits - TEXT3 | characters
- characters - digits digits/digits/digits - TEXT4 | characters
Is it possible to write a single regex that would work to extract TEXT1 / TEXT2 / TEXT3 / TEXT4 for all strings above?
And what if my string looks like this?
- Lorem Ipsum dolor/sit | LOT53 - Tc
- 80.LT79 - Lorem Ipsum Amet | LOT25 - Ar
- CT1: asda acar - 12 09-13-2022 - Lorem Ipsum dolor/sit | LOT54 - Ca
- 52.85 Cat - 9/17/2021 - Lorem, Ipsum & Dolor | LOT12 - Ps
I need a single regex to extract what is bold.