Jump to content

Search the Community

Showing results for tags 'return one row'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I need to return a string that has the greatest coincidence. I tried to add groups to define the length by number of characters. But not working. #include <Array.au3> $sText = _ '14D36E972-E325-11CE-BF91-08002BE10318' & @CRLF & _ '4D36Err2-E325-11CE-BFC1-08002BE10318' & @CRLF & _ '1D36E972-E325-11CE-BFC1-08452BE10318' & @CRLF & _ '4D36E972-E325-11CE-BFC1-08002BE10218' & @CRLF & _ '3D36E977-E325-11CE-BFC1-08002BE10318' & @CRLF & _ '4D36E9r6-E325-11CE-BFC1-08002BE10318' & @CRLF & _ '4D36Ee72-E325-11kE-BFC1-08002BE10318' & @CRLF & _ '4D36Ew2-E325-11CE-BFC1-08002BE10318' $sPat = '4D36E972-E325-11CE-BFC1-08002BE10318' ; $sPat = '4' _GetMaxSimilar($sText, $sPat) Func _GetMaxSimilar($sText, $sPat) $aPat = StringSplit($sPat, '') $Len = StringLen($sPat) -1 $aPat0 = '(?m)^(' For $i = $Len To 1 Step -1 $aPat0 &= 'Q' & StringLeft($sPat, $i) & 'E.*|' ; $aPat0 &= '(Q' & StringLeft($sText, $i) & 'E)(.*)|' Next $aPat0 = StringTrimRight($aPat0, 1) & ')' MsgBox(0, 'Pattern', $aPat0) $Out = StringRegExp($sText, $aPat0, 3) ; MsgBox(0, 'UBound', UBound($Out)) _ArrayDisplay($Out, 'Array') EndFunc
×
×
  • Create New...