Getting specific values with regex [JAVA, ANDROID]
- by David
I need to knowingly isolate each row of the vcard and get its value.
For instance, I want to get "5555" from X-CUSTOMFIELD.
So far, my thoughts are:
"X-CUSTOMFIELD;\d+"
I have been looking at some tutorials and I am a little confused with what function to use? What would my regex above return? Would it give me the whole line or just the numerical part (5555)?
I was thinking I i get the whole row, I can use substring to get the digits?
BEGIN:VCARD
VERSION:2.1
N:Last;First;
FN:First Last
TEL;HOME;VOICE:111111
TEL;MOBILE;VOICE:222222
X-CUSTOMFIELD;5555
END:VCARD