Author Topic: WCMatch Difficulties  (Read 2033 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12915
  • London, England
WCMatch Difficulties
« on: September 12, 2009, 10:20:22 AM »
I'm looking to detect any of the characters: <>/\\\":;?*|,=` from a string, but I can't seem to get the wcmatch to function correctly.

I am currently using this:

Code: [Select]
(wcmatch <string>  "[<>/\\\":;?*|,=`]")

Any help is appreciated,

Thanks

Lee

uncoolperson

  • Guest
Re: WCMatch Difficulties
« Reply #1 on: September 12, 2009, 10:30:16 AM »
not near autocad, but are you looking for
"""
"\"
etc...

or
"blah:blah"
"blah\"

?

Lee Mac

  • Seagull
  • Posts: 12915
  • London, England
Re: WCMatch Difficulties
« Reply #2 on: September 12, 2009, 10:59:27 AM »
blah*de/blah\blah<blah...

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: WCMatch Difficulties
« Reply #3 on: September 12, 2009, 11:01:13 AM »
This should get you started, i did not test.
Code: [Select]
(wcmatch <string>  "*[<>\\/\":;`?`*|`,=]*")
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Lee Mac

  • Seagull
  • Posts: 12915
  • London, England
Re: WCMatch Difficulties
« Reply #4 on: September 12, 2009, 03:23:20 PM »
Thanks Alan, I'll give that a try  :-)

VovKa

  • Water Moccasin
  • Posts: 1632
  • Ukraine
Re: WCMatch Difficulties
« Reply #5 on: September 12, 2009, 06:04:44 PM »
Code: [Select]
(snvalid <string>)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: WCMatch Difficulties
« Reply #6 on: September 12, 2009, 06:14:56 PM »
 :-)

it's peculiar how sometimes the way of thinking about the problem depends on the question.
« Last Edit: September 12, 2009, 06:18:05 PM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Lee Mac

  • Seagull
  • Posts: 12915
  • London, England
Re: WCMatch Difficulties
« Reply #7 on: September 12, 2009, 06:40:58 PM »
Code: [Select]
(snvalid <string>)

Thanks VovKa - not quite sure why I didn't go down that route.... one of those moments...  :ugly:

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: WCMatch Difficulties
« Reply #8 on: September 12, 2009, 09:05:21 PM »
Code: [Select]
(snvalid <string>)
You sir, are my hero. :love:
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

VovKa

  • Water Moccasin
  • Posts: 1632
  • Ukraine
Re: WCMatch Difficulties
« Reply #9 on: September 13, 2009, 05:15:47 AM »
You sir, are my hero. :love:
you make me blush, alanjt :*)