I have a String that looks like this and I want to extract the bit between the pipe and the tilde.
{>}D003 S/N|555555~EB
So the result of the parsing should give me 555555 back. Here is what I tried, but without success:
"""\D003 S/N|.*\~""".r.findFirstIn("{>}D003 S/N|555555~EB")
which gives me:
Some({>}D003 S/N|555555~)