I am having great issues searching a string for particular parameters that are needed in my application, I am under the assumption that the only real way to do this is using regular expressions however they are giving me a huge headache! I don’t usually write them myself but get them off other websites however what i need isn’t simple enough to be included 🙁
Here is the string:
10 50 u E2U+pstn:tel "!^(.*)$!tel:\\1;spn=42180;mcc=234;mnc=33!" .
I need to extract the spn, mcc, and the mnc from this string. Unfortunately the api i call changes the location of these on the string for some requests which makes indexing the string difficult. I really need to list what i need to grab the spn= for example then follow off and read the number but everything i try never works.
A solution using
PatternandMatcher:Edit: You can use named-capturing groups, too: