simpleonline
Active member
- Joined
- Sep 13, 2011
- Messages
- 33
- Programming Experience
- Beginner
My app needs to Parse the text to grab only the numbers, letters inside the apstrophes as seen below.
My current string for this is the same as above but my regex to get only the information between these apstrophnes doesn't return a results.
Note that I am trying to get all letters and numbers [a-zA-Z0-9]. My main issue is that the code has random - and _ codes in the challenge.
How can I configure my Regex to just grab anything inside the apstrophes?
thanks
VB.NET:
challenge : '03AHJ_VusHZDEr-qZYnfmRm4QbevEdYMXPLUibIP-bInEgiAPc0tk4e5MAVntRv_JbvD0q51aJOQp1FZ8RmIaMGt-Te9CSwkZyJhvSK70ZvdOA0AhPJz76t1FhXekXWIuor6YqdVwbqXSFlUSQvi9eL455ojSBkoQW_w'
My current string for this is the same as above but my regex to get only the information between these apstrophnes doesn't return a results.
Note that I am trying to get all letters and numbers [a-zA-Z0-9]. My main issue is that the code has random - and _ codes in the challenge.
How can I configure my Regex to just grab anything inside the apstrophes?
thanks
VB.NET:
Sub RegExGet1()
Dim value As String = "'challenge : '03AHJ_VusHZDEr-qZYnfmRm4QbevEdYMXPLUibIP-bInEgiAPc0tk4e5MAVntRv_JbvD0q51aJOQp1FZ8RmIaMGt-Te9CSwkZyJhvSK70ZvdOA0AhPJz76t1FhXekXWIuor6YqdVwbqXSFlUSQvi9eL455ojSBkoQW_w'"
Dim m As Match = Regex.Match(ResponseIT.Text, "'challenge : '[a-zA-Z0-9]'", RegexOptions.IgnoreCase)
If (m.Success) Then
Dim key As String = m.Groups(1).Value
KeyIt.Text = (key)
End If
End Sub