-
Aug 16th, 2017, 12:59 PM
#1
Thread Starter
Banned
help fix new line thing in text1
google.sbox.p50 && google.sbox.p50(["angle of",[["angle of the stage",0],["angle of the morning",0],["angel of darkness",0,[10]],["angle of attack",0],["angel of death",0,[10]],["angel of mine",0,[10]],["angel of the stage",0,[10]],["angle of depression",0],["angle of the stage nightcore",0],["angle of repose",0]],{"a":"HyrEb5RKrQJpePmuKqloyk9cZLSsas6vpeYwF3YvYQSRb0wIWXGbdPeADdUgmgFqWMEns73XSIvK1zjPr8Nd9Egzyx"," j":"fs","k":1,"q":"vLlBfz3ZQ2s_u912tcTNoknMaos"}])
updated this post made edits.
need to extract these strings in bold
Last edited by gennna21; Aug 16th, 2017 at 05:20 PM.
-
Aug 16th, 2017, 01:30 PM
#2
Re: help fix new line thing in text1
Show the code you are using.
-
Aug 16th, 2017, 05:20 PM
#3
Thread Starter
Banned
Re: help fix new line thing in text1
i made post1 edited , i need to extract all strings that are in bold.
then list then line by line
-
Aug 16th, 2017, 05:54 PM
#4
Re: help fix new line thing in text1
I threw your string in a file, as I didn't know where it was coming from. I just read it into a string variable.
Here's code that does what you ask, although I'm not sure it'll work in all the cases you might encounter. It certainly works for what you specified.
Code:
Private Sub Form_Load()
Dim s As String
Dim a1() As String
Dim a2() As String
Dim i As Long
Dim j As Long
Open App.Path & "\test.txt" For Binary As 1
s = Space$(LOF(1))
Get 1, , s
a1 = Split(s, """") ' Parse on quote marks.
ReDim a2(0 To UBound(a1)) ' Make space for actual data.
' Find the actual data.
j = -1
For i = 1 To UBound(a1)
If Right$(a1(i - 1), 1) = "[" And InStr(a1(i), " ") Then
j = j + 1
a2(j) = a1(i)
End If
Next i
ReDim Preserve a2(0 To j)
' Print out final results.
For i = 0 To UBound(a2)
Debug.Print a2(i)
Next i
End Sub
Enjoy,
Elroy
EDIT1: Also, I forgot to close the file, and you'd want to use FreeFile in production code.
EDIT2: Debug window output:
Code:
angle of
angle of the stage
angle of the morning
angel of darkness
angle of attack
angel of death
angel of mine
angel of the stage
angle of depression
angle of the stage nightcore
angle of repose
Last edited by Elroy; Aug 16th, 2017 at 05:58 PM.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|