[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Regular expression ... matching '*' character

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Regular expression ... matching '*' character
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Wed 14 Jul 2004 08:45 PM (UTC)  quote  ]
Message
You dont need to escape the @, thats probably why its not matching. Actually no, thats not it. Do you have "expand variables" checked? (If so, why?) There shouldnt be anything wrong with matching on @ (unless you do have expand variables checked).

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Sdj79   Belgium  (4 posts)  [Biography] bio
Date Wed 14 Jul 2004 06:12 PM (UTC)  quote  ]
Message
And found the solution ...
@ had to be matched using \x40

Thx for your help
[Go to top] top

Posted by Sdj79   Belgium  (4 posts)  [Biography] bio
Date Wed 14 Jul 2004 06:08 PM (UTC)  quote  ]
Message
you were right it's the @ matching that doesn't work :s
Trying to figure out why
[Go to top] top

Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Wed 14 Jul 2004 06:08 PM (UTC)  quote  ]
Message
A this time i've:
^[ ]*\[([\x2a]*)([\@]*)([\#]*)([X]*)([x]*)([\.]*)]$

The * looks to be after the open [ but you have it before.
\[\*

The final ] does not appear to be escaped.
\]

^[ ]\[\*([\x2a]*)([\@]*)([\#]*)([X]*)([x]*)([\.]*)\]$

Maybe that one will work.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Wed 14 Jul 2004 05:48 PM (UTC)  quote  ]
Message
It DOES work with * though. Perhaps other parts of your expression are problematic?

Try a regexp with JUST \* (match on a single asterisk) then check keep evaluating, repeat on same line, regexp, and change the color of it. Just to see if it is indeed some problem with... well, I dont know, that prevents you from matching.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Sdj79   Belgium  (4 posts)  [Biography] bio
Date Wed 14 Jul 2004 05:06 PM (UTC)  quote  ]
Message
That's the first thing i tried ... as it worked for other chars like '.'
But unfortunately that doens't seem to work with *
:s
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Wed 14 Jul 2004 02:10 PM (UTC)  quote  ]
Message
Try escaping it with \*.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

Posted by Sdj79   Belgium  (4 posts)  [Biography] bio
Date Wed 14 Jul 2004 11:54 AM (UTC)  quote  ]
Message
I was wondering how to match the * char

I'm trying to convert this
[*@@#######XXXXXXXXxxxx.........]

to numerical value ... my preblem is that i can't have * matched

A this time i've:
^[ ]*\[([\x2a]*)([\@]*)([\#]*)([X]*)([x]*)([\.]*)]$

which works perfectly but for the *

Can anyone help me?
[Go to top] 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.


2,944 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]