I need a little help with coding, please!

Does this look right?

^You gently touch the soul of \w+. You sense (?:her|his) health to be at (\d+)\ out of (\d+)\, mana to be at (\d+)\ out of (\d+)\, and ego to be at (\d+)\ out of (\d+)\.$ (?:She|He) is slightly tired.

If not, what can I do to fix it, please?

Comments

  • AeldraAeldra , using cake powered flight
    In general, this looks mostly fine. I wonder why you do escape the , and spaces though.

    For testing if your regular expression works, you do realize that you can just 'echo' to have a string sent back to you from the game, yes? Comes really handing for testing your triggers and figuring outwhere they struggle.
    Avatar / Picture done by the lovely Gurashi.
  • You probably need to escape the period at the end.
  • Does this come in across multiple lines?
    You’ll have to make this a gate trigger or something similar if so. 

  • How do you make this a gate trigger?
  • edited December 2017

    If you're using mudlet you can drag and drop triggers on top of each other. Vadi goes over it a little bit in this video.


  • Yeah, I assume as well that the $ indicates multiple lines, which would either require a multiline or gate trigger.

    For reference and future use: https://regex101.com/r/5GFRSx/1
    It's like pastebin, but for regex checking!
  • Thank you everyone! I got this sorted out.
Sign In or Register to comment.