Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ VBscript ➜ Multi Line Matching per say

Multi Line Matching per say

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2  3 

Posted by WRTIII   Canada  (76 posts)  Bio
Date Reply #30 on Sun 11 Jan 2004 09:07 PM (UTC)
Message
Ok So when I want to evaluate the text I have stored in the variable "desc"

What you appeared to have used was...

Set regEx = New RegExp

' get trigger match text
regEx.Pattern = "In your immediate vicinity you see ([^.]*)\.?"

Set Matches = regEx.Execute(desc)

For Each match in Matches

ColourNote "blue", "white", _
"In my vicinity is: " & Match.SubMatches (0)

items = Split (Match.SubMatches (0), ",")

For Each item in Items
ColourNote "green", "white", "Item = " & Trim (item)
Next

Next

Set Match = Nothing

regEx.Pattern = "You could progress ([^.]*)\.?"

Set Matches = regEx.Execute(desc)

For Each match in Matches

ColourNote "blue", "white", _
"I can go: " & Match.SubMatches (0)

items = Split (Match.SubMatches (0), ",")

For Each item in Items
ColourNote "green", "white", "Direction = " & Trim (item)
Next

Next

Set regEx = Nothing

end if ' have a description


And to be honest I don't understand any of that..

All I want for now is for it to search the text and match on any of theese..

Match: (advertising flyer|armour of agemennion|bejewelled casket|bishops mitre|black sceptre|blue cloak|bronze headband|cardinal's shield|cloak de treville|chalice of eternal life|chunk of silver ore|crucifix|cup of our lord|dagger of the ancients|father mazarin's pipe|golden branches|gold fob-watch|hammer of the underworld|helm of artemides|horn of the great boar|jade bracelet|king's snuff box|libram of herbal alchemy|libram of ineffable damnation|lyre of memnon|owl of athena|painting of paris by night|pair of winged shoes|piece of iron ore|queen's silver mirror|rustic shovel|shroud of mourning|silver amulet|silver goblet|silver ring|silver scimitar|staff of hermes|stethoscope|thin telescope|toy scabbard with many scuff marks)

If it matches on any of thoose it will GET %1

plain and simple
If I have to use that "set regex = new regexp" stuff then can someone please explain it in detail or hopefully point me to where I can read how it all works in detail.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


106,871 views.

This is page 3, subject is 3 pages long:  [Previous page]  1  2  3 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.