Freelancer: amongdota
Del:
Anmeld Indlæg

graph

'I made this code on Visual Basic 6 Function TestRegExp(myPattern As String, myString As String) 'Create objects. Dim objRegExp As RegExp Dim objMatch As match Dim colMatches As MatchCollection Dim RetStr As String ' Create a regular expression object. Set objRegExp = New RegExp 'Set the pattern by using the Pattern property. objRegExp.Pattern = myPattern objRegExp.IgnoreCase = True 'Set global applicability. objRegExp.Global = True 'Test whether the String can be compared. If (objRegExp.Test(myString) = True) Then 'Get the matches. Set colMatches = objRegExp.Execute(myString) ' Execute search. List1.Clear For Each objMatch In colMatches List1.AddItem Trim(Mid(objMatch, 2, Len(objMatch) - 2)) Next Else RetStr = "String Matching Failed" End If TestRegExp = RetStr End Function Private Sub Command1_Click() TestRegExp ">([^\""]*)\""", Text1.Text End Sub

Konkurrenceindlæg #1 for                                                 get string between two string

Offentlig Præciserings Opslagstavle

  • Yladiator
    Konkurrenceafholder
    • 10 år siden

    i wanna the output to be all the words contains yahya

    • 10 år siden