फ़ाइल के कॉन्टेंट को खोजना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
डिफ़ॉल्ट रूप से, कोई क्वेरी फ़ाइल पाथ और कॉन्टेंट, दोनों को खोजती है. content
फ़िल्टर का इस्तेमाल करके, खोज के नतीजों को सिर्फ़ किसी फ़ाइल के कॉन्टेंट तक सीमित किया जा सकता है. उदाहरण के लिए, यहां दी गई क्वेरी में सभी Java फ़ाइलों के कॉन्टेंट में main
शब्द को खोजा गया है. यह उन उदाहरणों को नहीं खोजता जिनमें पाथ में main
शब्द शामिल होता है.
lang:java content:main
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe default search includes both file paths and file content.\u003c/p\u003e\n"],["\u003cp\u003eFor content-only searches, use the \u003ccode\u003econtent\u003c/code\u003e filter, like \u003ccode\u003econtent:main\u003c/code\u003e to find "main" within Java files.\u003c/p\u003e\n"],["\u003cp\u003eThis approach avoids irrelevant results from file paths containing the search term.\u003c/p\u003e\n"]]],[],null,["# Searching file contents\n\nBy default, a query searches both the file path and the content. You can\nrestrict your search to just the contents of a file by using the\n[`content`](../reference#filters) filter. For example, the following query looks\nfor the term `main` in the contents of all Java files. It does not search for\ninstances where a path contains the term `main`. \n\n lang:java content:main"]]