<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:50 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-1114] Regular Expression on IPAddress format like does not work as expected</title>
                <link>https://jira.mongodb.org/browse/JAVA-1114</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I am using Mongo 2.4.9, and I use simple search for my application for IPAddress search.&lt;/p&gt;

&lt;p&gt;I give search some thing like: &quot;192.168.1.1*&quot; , but it returns even with IP Address starting from 192.168.2* and 192.168.4* which are in my db. It has to respond only with 192.168.1.1*. details of execution is below and it would be really great help if I know which version of latest MONGO has a fix for this kind of issue if at all be raised by some one already and have been fixed. If not fixed this is the major bug for my release this week.&lt;/p&gt;

&lt;p&gt;Query: { &quot;$and&quot; : [ { &quot;ipAddress&quot; : { &quot;$regex&quot; : &quot;192.168.1.*&quot;}}]}, Fields: null, Sort: null&lt;br/&gt;
192.168.1.102&lt;br/&gt;
192.168.1.114&lt;br/&gt;
192.168.1.117&lt;br/&gt;
192.168.1.123&lt;br/&gt;
192.168.1.130&lt;br/&gt;
192.168.1.140&lt;br/&gt;
192.168.1.151&lt;br/&gt;
192.168.1.155&lt;br/&gt;
192.168.1.158&lt;br/&gt;
192.168.1.182&lt;br/&gt;
192.168.1.220&lt;br/&gt;
192.168.1.221&lt;br/&gt;
192.168.1.223&lt;br/&gt;
192.168.1.224&lt;br/&gt;
192.168.1.225&lt;br/&gt;
192.168.1.226&lt;br/&gt;
192.168.1.227&lt;br/&gt;
192.168.1.228&lt;br/&gt;
192.168.1.229&lt;br/&gt;
192.168.1.230&lt;br/&gt;
192.168.1.231&lt;br/&gt;
192.168.1.232&lt;br/&gt;
192.168.1.233&lt;br/&gt;
192.168.1.234&lt;br/&gt;
192.168.1.235&lt;br/&gt;
192.168.1.236&lt;br/&gt;
192.168.1.237&lt;br/&gt;
192.168.1.238&lt;br/&gt;
192.168.1.239&lt;br/&gt;
192.168.1.240&lt;br/&gt;
192.168.1.241&lt;br/&gt;
192.168.1.242&lt;br/&gt;
192.168.1.243&lt;br/&gt;
192.168.1.244&lt;br/&gt;
192.168.1.245&lt;br/&gt;
192.168.1.246&lt;br/&gt;
192.168.1.247&lt;br/&gt;
192.168.1.248&lt;br/&gt;
192.168.1.250&lt;br/&gt;
192.168.1.251&lt;br/&gt;
192.168.1.252&lt;br/&gt;
192.168.1.253&lt;br/&gt;
192.168.1.254&lt;br/&gt;
192.168.1.255&lt;br/&gt;
192.168.4.163&lt;br/&gt;
192.168.4.63&lt;/p&gt;</description>
                <environment>2.4 &amp;amp; Above</environment>
        <key id="111229">JAVA-1114</key>
            <summary>Regular Expression on IPAddress format like does not work as expected</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="ross@mongodb.com">Ross Lawley</assignee>
                                    <reporter username="sridhar.cavirin">Sridhar</reporter>
                        <labels>
                    </labels>
                <created>Mon, 17 Feb 2014 18:19:28 +0000</created>
                <updated>Thu, 16 Jul 2015 14:35:28 +0000</updated>
                            <resolved>Mon, 10 Mar 2014 16:24:13 +0000</resolved>
                                    <version>2.4</version>
                                                    <component>Query Operations</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="512594" author="ross@10gen.com" created="Mon, 10 Mar 2014 16:24:02 +0000"  >&lt;p&gt;Hi there,&lt;/p&gt;

&lt;p&gt;This Jira project is intended only for issues with the MongoDB Java driver. The question you are asking here is more appropriate for our users group, which you can find here: &lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://groups.google.com/forum/#!forum/mongodb-user&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I did notice that your query didn&apos;t match the listed example eg: matching all documents &lt;tt&gt;192.168.1.1*&lt;/tt&gt; the example given is checking &lt;tt&gt;192.168.1*&lt;/tt&gt;.&lt;/p&gt;

&lt;p&gt;As you are working with regular expressions and you want to search against a string that contains dots you should escape them as in regular expressions dots match almost any character. eg:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;db.myDatabase.find( { &quot;ipAddress&quot; : { &quot;$regex&quot; : &quot;192\.168\.1\.1(.*)&quot;}})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrufz3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>91561</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>