RegExp

Posted by WRTIII on Sun 11 Jan 2004 01:35 AM — 2 posts, 11,652 views.

Canada #0
I want a trigger that will match on an asterik.
but it has to accomendate varations of how the asterik is shown. ie.

*
/*
*\
/*\
p/*\
/*\p
p/*
*\p

In any case the asterik is always there

So What I need is

Match the * regardless of what is prior to or after it
in the case that something is prior to or after it


So I know ^\* will match an asterik
^ is start of line

so I guess I need ^*\**$ lol I am getting lost trying to follow all this regexp stuff


The other problem I am having may or may not time in with this...

*
You walk westwards.
Rue Esertudins.
The Rue Esertudins continues to the west. The Rue St. Opportune is to the
east. Nearby to your south is the entrance of The Frog and Peach. Nearby to
your south-west is the entrance of Pierre's House of Healing. You could
progress eastwards, westwards. You see two battle horses ahead of you.
* e
I do not understand.

right now I just have it set to color the lines it matches with is
You walk westwards.
and the * after the description

The first trigger enables the trigger to match the star
The trigger that matches the star turns itself off

The You walk westwards. matches perfectly
as for the asterik though (( I just made it match asterik only and am careful to keep it only at an asterik while I test until I get the correct regexp ))

But After the description shows the last thing to show is the * which is not colored

It does not color until I input something in this case I put in E then the asterik becomes colored ok just checked...
until I type something after the star shows up the 2nd trigger is still enabled... so when I move somewhere I get this...


* w
You begin to walk westwards.
*
You walk westwards.
Rue Esertudins.
The Rue Esertudins continues to the west. The Rue St. Opportune is to the
east. Nearby to your south is the entrance of The Frog and Peach. Nearby to
your south-west is the entrance of Pierre's House of Healing. You could
progress eastwards, westwards. In your immediate vicinity you see a battle
horse.
*

and it will sit like that with the last asterik and the trigger to match it not working until either the game or myself causes the next line to appear..

So I am not sure if it's the regexp causing that or if there is no hard return after the asteriks but I need that to activate right away otherwise the delay means I will be moving into the next room before the trigger evaluates the description.

wow a lot longer post than i meant it to be hopefully I gave enough info I have all the helpfiles I can find on this matter but still can't seem to get past it thanks
Australia Forum Administrator #1
A regexp that will match an asterisk anywhere on a line?

Try this:

\*