chiruu12 commented on issue #191:
URL: 
https://github.com/apache/incubator-hugegraph-ai/issues/191#issuecomment-2696486630

   
   > [@chiruu12](https://github.com/chiruu12) OK, a simple idea is to determine 
whether the **first character** of the IP/URI_PREFIX param is a number:
   > 
   > * If it is, it defaults to the HTTP protocol.
   > * If not, only the `HTTP` and `HTTPS` string **prefixes** are supported 
for filling in.
   > 
   
   @imbajin sir this can be an approach, but we can make it better by using 
regex filter instead just checking the first character can cause problem as 
some website like 365x.ai will be having the first character as a number but it 
is a URI not IP I found a regex pattern for IPv4 Addresses which is 
   ```
   
^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
   ```
   using this we can assure that we are categorizing the IP/URI properly and 
this approach would allow users to input addresses without worrying about the 
correct protocol prefix, enhancing usability. What are your thoughts on this 
solution?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to