1 Reply Latest reply on Oct 8, 2009 1:56 AM by Adobe-InDesign CS4

    is Not Working Properly (.*?) in indesign javascript

    Aravindh PDMR

      In IndesignCS3 Javascript couldn't get immediate occurance for example <month>.*?</month>

      It fetches months content from bolded opening month to closing month. What is the meaning of "?"

      input of the document:

       

      <ref id="r34">
      <label>34</label>
      <nlm-citation citation-type="journal">
      <person-group person-group-type="author">
      </person-group>
      <article-title>Is there a relationship between service integration and differentation and patient outcomes?</article-title>
      <source>International Journal of Integrated Care [serial online]</source>
      <year>2003</year>
      <month>11</month>
      <day>10</day>
      <volume>3</volume>
      </nlm-citation>
      <ref id="r35">
      <label>35</label>
      <nlm-citation citation-type="journal">
      <person-group person-group-type="author">

      </person-group>
      <article-title>Does integration really make a difference?</article-title>
      <source>A comparison of old age psychiatry services in England and Northern Ireland. International Journal of Geriatric Psychiatry</source>
      <year>2003</year>

      <month>2003</month>
      <volume>18</volume>
      <issue>10</issue>
      <fpage>887</fpage>
      <lpage>93</lpage>
      </nlm-citation>

        • 1. Re: is Not Working Properly (.*?) in indesign javascript
          Adobe-InDesign CS4 Level 1

          Dear Aravindth

           

            (.*?) means -> Select all contents from where you start and end,

           

          For Ex. <month>(.*?)</month> then Select for start <month> and end last </month> tag.

           

          (?) Match zero or one occurrences. Equivalent to {0,1}.

           

          (*) Match zero or more occurrences. Equivalent to {0,}.

           

          (+) Match one or more occurrences. Equivalent to {1,}.

           

          (.) (Dot). Match any character except newline or another Unicode line terminator.

           

           

          (.*?) means -> Zero or more times Match any character except newline or another Unicode line terminator + Match zero or more occurrences. Equivalent to {0,}.+Match zero or one occurrences. Equivalent to {0,1}.

           

           

          Could you please refere the below cite :

           

          http://www.javascriptkit.com/jsref/regexp.shtml

           

           

          Thanks & Regards

          T.R.Harihara SudhaN