Considering the following string
"Nr.: &N|1|2|3|4|5|6|7 / 8|9|10|11|12 / 2014"
I would like to get the following match:
"&N|1|2|3|4|5|6|7 / 8|9|10|11|12 "
Though the regex pattern &N\|(.*|$)\s
matches:
"&N|1|2|3|4|5|6|7 / 8|9|10|11|12 / "
But after the last vertical line, I would like to match only until the next and not the last space.
Any ideas of how I could solve this?