Match

C10 - initial

match (Sifts)
TypeCorrade progressive sift
Siftmatch
Parametersa string representing a regular expression
DescriptionThe match sift will match the whole returned list against a provided regular expression.
Last ChangesNone

The match sift will match the whole returned list against a provided regular expression.

Arguments

Position Type Description Example
0 a string representing a regular expression return all subsequent matching subgroups (except the first which represents the entire string) Item Cost ([0-9]+)

Example

The following sift when added to a command will skip the first element and then return all subsequent subgroups matching the expression Item Cost ([0-9]+):

    "sift", wasListToCSV([
        "skip", 1,
        "match", "Item Cost ([0-9]+)"
    ]),

Effect on Returned Data

Given the input

data=1,Item Cost 100,2,Item Cost 500,3,Item Cost 10,4,Item Cost 15

the expected output is:

data=100,500,10,15

Notes

  • Even if Corrade chains rows together in order to mimic columns, CSV is still not a regular language so please use the match sift sparingly. Extracting cells from Corrade's CSV output can usually be performed more elegantly using the other available sifts that are implicitly compatible with CSV.

secondlife/scripted_agents/corrade/api/sifts/match.txt ยท Last modified: 2020/09/04 06:46 (external edit)

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the copyright, license, warranty and privacy terms for the usage of this website please see the license, privacy, copyright and the plagiarism pages.