<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Stephane,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">For your first question, sorry we do not have a different version (using regex) around.</div><div class="gmail_default" style="font-family:verdana,sans-serif">The second one is a hard question. Yes, we try pretty hard to maintain backward compatible,</div><div class="gmail_default" style="font-family:verdana,sans-serif">and as you can see, most of NCL functions are, but that is not always the case.</div><div class="gmail_default" style="font-family:verdana,sans-serif">Like here str_match is one of them.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">As I said, str_match was developed using regex, then there were quite few issues with it,</div><div class="gmail_default" style="font-family:verdana,sans-serif">and we switched to plain character string match. it solved some issues, then caused some</div><div class="gmail_default" style="font-family:verdana,sans-serif">new one, like the ones Sophie (and probably you) got, and certainly the backward compatible</div><div class="gmail_default" style="font-family:verdana,sans-serif">issues as those two schemes functioning pretty different.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Let say this, we will have a NCL group meeting tomorrow. Let me rise this issue at our group</div><div class="gmail_default" style="font-family:verdana,sans-serif">meeting, and discuss what we should handle this issue and then come back to you.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">At this point, if you have any comments/suggestions/requirements, please let us know, so we can</div><div class="gmail_default" style="font-family:verdana,sans-serif">discuss it. Certainly we welcome other people chip-in their ideas as well.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Wei</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><font face="tahoma, sans-serif">================================================</font><div><font face="tahoma, sans-serif">1850 Table Mesa Dr.</font></div><div><font face="tahoma, sans-serif">Boulder, CO 80307</font></div><div><font face="tahoma, sans-serif">Phone: 303-497-8924</font></div></div></div></div>
<br><div class="gmail_quote">On Mon, Mar 9, 2015 at 10:28 AM, SENESI Stéphane <span dir="ltr"><<a href="mailto:stephane.senesi@meteo.fr" target="_blank">stephane.senesi@meteo.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:garamond,new york,times,serif;font-size:12pt;color:#000000"><div>Hi Wei Huang<br></div><div><br></div><div>Is there an new function that would match the old behaviour of str_match ?</div><div>Is there any commitment from NCL on backward compatibility on basic functions?<br></div><div><br></div><div>Best regards<br></div><div><br></div><div>S<br></div><div><br></div><hr><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>De: </b>"TYTECA Sophie" <<a href="mailto:sophie.tyteca@meteo.fr" target="_blank">sophie.tyteca@meteo.fr</a>><br><b>À: </b>"SENESI Stéphane" <<a href="mailto:stephane.senesi@meteo.fr" target="_blank">stephane.senesi@meteo.fr</a>><br><b>Envoyé: </b>Lundi 9 Mars 2015 17:01:19<br><b>Objet: </b>Fwd: [ncl-talk] Problem with str_match<br><div><br></div><div style="font-family:garamond,new york,times,serif;font-size:12pt;color:#000000"><div>Voici l'explication, mais cela ne nous arrange pas!<br></div><span class=""><div><br></div><div><span></span>----- Météo-France -----<br>TYTECA SOPHIE<br>CNRM/GMGEC/VDR <br><a href="mailto:sophie.tyteca@meteo.fr" target="_blank">sophie.tyteca@meteo.fr</a> <br>Fixe : <a href="tel:%2B33%20561079379" value="+33561079379" target="_blank">+33 561079379</a><span></span><br></div><hr></span><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>De: </b>"Wei Huang" <<a href="mailto:huangwei@ucar.edu" target="_blank">huangwei@ucar.edu</a>><br><b>À: </b>"TYTECA Sophie" <<a href="mailto:sophie.tyteca@meteo.fr" target="_blank">sophie.tyteca@meteo.fr</a>><br><b>Cc: </b><a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br><b>Envoyé: </b>Lundi 9 Mars 2015 16:40:46<br><b>Objet: </b>Re: [ncl-talk] Problem with str_match<div><div class="h5"><br><div><br></div><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Sophie,</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">In the earlier version, NCL used regex for string match, which is why it worked there.</div><div class="gmail_default" style="font-family:verdana,sans-serif">The current version, NCL has switched to character match, which is why it failed there.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Here is a short code (based on your case) on how to use NCL str_match.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default"><div class="gmail_default"><span style="font-family:verdana,sans-serif">;NCL does not support regex string match/compare, the following code will return missing.</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"> varname="rntcre"</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"> a=str_match(varname,"r[lsn][ats]cre")</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"> print (a)</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"><br></span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">;NCL supports plain character string match, the following code will return the match.</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"> b=str_match(varname,"ntcre")</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"> print (b)</span></div><div class="gmail_default">------------------------</div><div class="gmail_default">Here is the print out from the code above.</div><div class="gmail_default">-------------------------------</div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Variable: a</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Type: string</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Total Size: 8 bytes</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"> 1 values</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Number of Dimensions: 1</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Dimensions and sizes: [1]</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Coordinates: </span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Number Of Attributes: 1</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"> _FillValue : missing</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">(0) missing</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"><br></span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"><br></span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Variable: b</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Type: string</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Total Size: 8 bytes</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"> 1 values</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Number of Dimensions: 1</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Dimensions and sizes: [1]</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Coordinates: </span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">(0) rntcre</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"><br></span></div><div class="gmail_default"><br></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Please let ncl-talk know if there is anything can help.</span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"><br></span></div><div class="gmail_default"><span style="font-family:verdana,sans-serif">Wei</span></div><div style="font-family:verdana,sans-serif"><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><span style="font-family:tahoma,sans-serif">================================================</span><div><span style="font-family:tahoma,sans-serif">1850 Table Mesa Dr.</span></div><div><span style="font-family:tahoma,sans-serif">Boulder, CO 80307</span></div><div><span style="font-family:tahoma,sans-serif">Phone: <a href="tel:303-497-8924" value="+13034978924" target="_blank">303-497-8924</a></span></div></div></div></div><br><div class="gmail_quote">On Mon, Mar 9, 2015 at 9:27 AM, TYTECA Sophie <span dir="ltr"><<a href="mailto:sophie.tyteca@meteo.fr" target="_blank">sophie.tyteca@meteo.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:garamond,new york,times,serif;font-size:12pt;color:#000000"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div style="font-family:garamond,new york,times,serif;font-size:12pt;color:#000000"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div style="font-family:garamond,new york,times,serif;font-size:12pt;color:#000000"><div>Hello,</div><div><br></div><div>I have a problem with str_match function and the NCL last version .<br></div><div>the result gives "missing" in my string<br></div><div><br></div><div>Here my machine: Linux x86_64 GNU/Linux</div><div><br></div><div><strong>ncl</strong><br> Copyright (C) 1995-2014 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language <strong>Version 6.2.1</strong><br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br><strong>ncl 0> varname="rntcre"</strong><br><strong>ncl 1> a=str_match(varname,"r[lsn][ats]cre")</strong><br><strong>ncl 2> print (a)</strong><br><div><br></div>Variable: a<br>Type: string<br>Total Size: 8 bytes<br> 1 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [1]<br>Coordinates: <br>Number Of Attributes: 1<br> _FillValue : missing<br>(0) <span style="color:rgb(255,0,0)">missing</span><br><div><br></div><div>this function works with NCL previous version:<br></div><div><br></div><div><strong>ncl</strong><br> Copyright (C) 1995-2012 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language <strong>Version 6.1.0</strong><br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br><strong>ncl 0> varname="rntcre"</strong><br><strong>ncl 1> a=str_match(varname,"r[lsn][ats]cre")</strong><br><strong>ncl 2> print (a)</strong><br><div><br></div>Variable: a<br>Type: string<br>Total Size: 8 bytes<br> 1 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [1]<br>Coordinates: <br>(0) <span style="color:rgb(255,0,0)">rntcre</span><br><div><br></div></div></div><div>Could you help me, please?<br></div><div>Thank you very much<br></div><div><br></div><div><span></span>----- Météo-France -----<br>TYTECA SOPHIE<br>CNRM/GMGEC/VDR <br><a href="mailto:sophie.tyteca@meteo.fr" target="_blank">sophie.tyteca@meteo.fr</a> <br>Fixe : <a href="tel:%2B33%20561079379" target="_blank">+33 561079379</a><span></span><br></div></div></div><div><br></div></div></div><div><br></div></div></div><br>_______________________________________________<br> ncl-talk mailing list<br> List instructions, subscriber options, unsubscribe:<br> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br> <br></blockquote></div><br></div></div></div></div><div><br></div></div></blockquote><span class="HOEnZb"><font color="#888888"><div><br><div><br></div></div><div><br></div><div>-- <br></div><div><span name="x"></span>----- Météo-France -----<br>SENESI STEPHANE<br>CNRM/GMGEC/ASTER <br><a href="mailto:stephane.senesi@meteo.fr" target="_blank">stephane.senesi@meteo.fr</a> <br>Fixe : <a href="tel:%2B33%20561079931" value="+33561079931" target="_blank">+33 561079931</a><span name="x"></span><br></div></font></span></div></div></blockquote></div><br></div>