I need a little help with coding, please!

VefaiVefai Member Posts: 7 Inept
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?


  • AeldraAeldra , using cake powered flight Member Posts: 1,107 Transcendent
    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 Xeii. Wheeeeee 
  • MoiMoi Member Posts: 1,135 Transcendent
    You probably need to escape the period at the end.
  • SondaygaSondayga Member Posts: 55 Capable
    Does this come in across multiple lines?
    You’ll have to make this a gate trigger or something similar if so. 

  • VefaiVefai Member Posts: 7 Inept
    How do you make this a gate trigger?
  • SondaygaSondayga Member Posts: 55 Capable
    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.

  • EjderhaEjderha Member Posts: 168 Gifted
    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!
  • VefaiVefai Member Posts: 7 Inept
    Thank you everyone! I got this sorted out.
Sign In or Register to comment.