urlObject.search() method in Node is used to get the search query within the hostname which is followed by the ‘?’ character.
Return : Returns the search query after ‘?’ character.
Example #1 : In these examples, we have shown how the
urlObject.search() method is able to extract the search query from the hostname.
Example #2 :
- How to resolve 'node' is not recognized as an internal or external command error after installing Node.js ?
- Node js | OS
- Node.js | os.EOL
- Why Node.js ?
- Node.js | EventEmitter
- What is the Punycode in Node.js ?
- Routing in Node.js
- Node | URL.host API
- Node | URL.protocol API
- Node | URL.password API
- Node.js | First Application
- Node | URL.href API
- Node.js Inspector
- Node.js Events
- Node.js | This Binding
- Node.js | Frameworks
- Node | URL.hostname API
- Node | URL.resolve(from,to) API
- Node.js | Basics
- How to use Class in Node.js ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.