<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Wcmatch wtih wildcards in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-wtih-wildcards/m-p/10070395#M64616</link>
    <description>&lt;P&gt;Thats amazing, it works exactly how I anticipated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your help!&lt;/P&gt;</description>
    <pubDate>Tue, 09 Feb 2021 18:28:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-02-09T18:28:38Z</dc:date>
    <item>
      <title>Wcmatch wtih wildcards</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-wtih-wildcards/m-p/10070018#M64614</link>
      <description>&lt;P&gt;Hello all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for considering to answer my question here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i have many variations of "structure IDs" this one in particular is&amp;nbsp;"stk 55[3C] P1"&lt;/P&gt;&lt;P&gt;I have the structure of a program to go search all cogo point description and find my structure number ("stk &lt;STRONG&gt;55[3C]&lt;/STRONG&gt; P1")&lt;/P&gt;&lt;P&gt;However, I am having issues on the matching part.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The names varry and could have [] or - or _ so i tried using LeeMacs Code but cant get it to work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached the code i have been working on as well- its a little messy as i am still working on it&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.lee-mac.com/escapewildcards.html" target="_blank"&gt;http://www.lee-mac.com/escapewildcards.html&lt;/A&gt;&amp;nbsp;- here is the like to lee macs code i waas trying to use&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;;; Escape Wildcards  -  Lee Mac
;; Escapes wildcard special characters in a supplied string

(defun LM:escapewildcards ( str )
    (if (wcmatch str "*[-#@.*?~`[`,]*,*`]*")
        (if (wcmatch str "[-#@.*?~`[`,]*,`]*")
            (strcat "`" (substr str 1 1) (LM:escapewildcards (substr str 2)))
            (strcat     (substr str 1 1) (LM:escapewildcards (substr str 2)))
        )
        str
    )
)



(LM:escapewildcards "stk 55[3C] P1" )
(WCMATCH  "stk 55[3C] P1"(LM:escapewildcards "55[3C]"))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Escentally would this not work for matching up with any string to any pattern?&lt;/P&gt;&lt;P&gt;what am i doing wrong and what could be the solution?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 16:21:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-wtih-wildcards/m-p/10070018#M64614</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-09T16:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Wcmatch wtih wildcards</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-wtih-wildcards/m-p/10070231#M64615</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(wcmatch  "stk 55[3C] P1" (strcat "*" (LM:escapewildcards "55[3C]") "*"))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also use STRCASE function to change letter case since WCMATCH comparison is case-sensitive, so uppercase and lowercase characters must match.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 17:26:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-wtih-wildcards/m-p/10070231#M64615</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2021-02-09T17:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Wcmatch wtih wildcards</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-wtih-wildcards/m-p/10070395#M64616</link>
      <description>&lt;P&gt;Thats amazing, it works exactly how I anticipated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 18:28:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/wcmatch-wtih-wildcards/m-p/10070395#M64616</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-02-09T18:28:38Z</dc:date>
    </item>
  </channel>
</rss>

