Skip to content
KitploitKITPLOIT
उपकरणब्लॉग
जमा करें
उपकरणब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

··फ़ीड·संपर्क·गोपनीयता·© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
exrex — नियमित अभिव्यक्तियों पर अनियमित विधियाँ | Kitploit
उपकरण/GitHubGitHub/asciimoo/exrex
सामान्य उपयोगिताएँपेलोड जनरेशनफज़िंग
GitHubasciimoo/exrex

exrex

नियमित अभिव्यक्तियों पर अनियमित विधियाँ

रिपॉजिटरी देखें
957988 महीने पहलेKitploit द्वारा समीक्षित

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →
साझा करें

EXREX

रेगुलर एक्सप्रेशन के लिए अनियमित विधियाँ।

Exrex एक कमांड लाइन टूल और पायथन मॉड्यूल है जो दिए गए रेगुलर एक्सप्रेशन के सभी - या यादृच्छिक - मिलान वाले स्ट्रिंग उत्पन्न करता है और भी बहुत कुछ। यह शुद्ध पायथन है, बिना किसी बाहरी निर्भरता के।

कुछ रेगुलर एक्सप्रेशन के अनंत मिलान वाले स्ट्रिंग होते हैं (जैसे: [a-z]+), ऐसे मामलों में exrex अनंत भागों की अधिकतम लंबाई को सीमित करता है।

Exrex जनरेटर का उपयोग करता है, इसलिए मेमोरी उपयोग मिलान वाले स्ट्रिंग की संख्या पर निर्भर नहीं करता है।

Version Downloads

विशेषताएँ

  • सभी मिलान वाले स्ट्रिंग उत्पन्न करना
  • एक यादृच्छिक मिलान वाला स्ट्रिंग उत्पन्न करना
  • मिलान वाले स्ट्रिंग की संख्या गिनना
  • रेगुलर एक्सप्रेशन का सरलीकरण

स्थापना

exrex को स्थापित करने के लिए, बस:

root@kitploit:~
$ pip install exrex

या

root@kitploit:~
$ easy_install exrex

उपयोग

पायथन मॉड्यूल के रूप में

root@kitploit:~
>>> import exrex

>>> exrex.getone('(ex)r\\1')
'exrex'

>>> list(exrex.generate('((hai){2}|world!)'))
['haihai', 'world!']

>>> exrex.getone('\d{4}-\d{4}-\d{4}-[0-9]{4}')
'3096-7886-2834-5671'

>>> exrex.getone('(1[0-2]|0[1-9])(:[0-5]\d){2} (A|P)M')
'09:31:40 AM'

>>> exrex.count('[01]{0,9}')
1023

>>> print '\n'.join(exrex.generate('This is (a (code|cake|test)|an (apple|elf|output))\.'))
This is a code.
This is a cake.
This is a test.
This is an apple.
This is an elf.
This is an output.

>>> print exrex.simplify('(ab|ac|ad)')
(a[bcd])

कमांड लाइन उपयोग

root@kitploit:~
> exrex --help
usage: exrex.py [-h] [-o FILE] [-l] [-d DELIMITER] [-v] REGEX

exrex - regular expression string generator

positional arguments:
  REGEX                 REGEX string

optional arguments:
  -h, --help            show this help message and exit
  -o FILE, --output FILE
                        Output file - default is STDOUT
  -l N, --limit N       Max limit for range size - default is 20
  -c, --count           Count matching strings
  -m N, --max-number N  Max number of strings - default is -1
  -r, --random          Returns a random string that matches to the regex
  -s, --simplify        Simplifies a regular expression
  -d DELIMITER, --delimiter DELIMITER
                        Delimiter - default is \n
  -v, --verbose         Verbose mode

उदाहरण:

root@kitploit:~
$ exrex '[asdfg]'
a
s
d
f
g

$ exrex -r '(0[1-9]|1[012])-\d{2}'
09-85

$ exrex '[01]{10}' -c
1024

बग्स

बग या सुझाव? इश्यू ट्रैकर पर जाएँ।

दस्तावेज़ीकरण

http://exrex.readthedocs.org/en/latest/

TODO

  • डिफ़ॉल्ट कैरेक्टर सेट/रेंज/रेंज सीमाएँ बदलने के लिए कमांड लाइन स्विच (जैसे '.', '\s'.. के लिए) (40%)
  • श्रेणियों का विस्तार (re.sre_parse.CATEGORIES) (30%)
  • setup.py में सुधार करें
  • अधिक विस्तृत कोड
  • दस्तावेज़ीकरण
  • अनुकूलन
  • n अलग-अलग यादृच्छिक मिलान वाले स्ट्रिंग का उत्पादन
  • मेमोरी उपयोग में कमी (100%?) - जनरेटर
  • मिलान वाले स्ट्रिंग की संख्या गिनना - (100%?)
  • यूनिकोड समर्थन (100%)
  • ग्रुपरेफ़ को संभालना (100%)
  • Python3 संगतता (100%) (>= python3.3)

लाइसेंस

root@kitploit:~
exrex is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

exrex is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with exrex. If not, see < http://www.gnu.org/licenses/ >.

(C) 2012- by Adam Tauber, <[email protected]>

मज़ा/कला

  • नाव: exrex '( {20}(\| *\\|-{22}|\|)|\.={50}| ( ){0,5}\\\.| {12}~{39})'
  • आँखें: exrex '(o|O|0)(_)(o|O|0)'

समान प्रोजेक्ट

ऐसे उपकरण जो किसी दिए गए पैटर्न से मेल खाने वाले सभी संभावित स्ट्रिंग की सूची उत्पन्न करते हैं:

  • regldg (वेबसाइट पर एक लाइव डेमो है)
  • regex-genex (एकाधिक regex पैटर्न का एक साथ उपयोग करने का समर्थन करता है)

ऐसे उपकरण जो एक-एक करके यादृच्छिक स्ट्रिंग उत्पन्न करते हैं जो किसी दिए गए पैटर्न से मेल खाते हों:

  • randexp.js (वेबसाइट पर कई लाइव डेमो हैं)
  • rstr.xeger (rstr पायथन मॉड्यूल की एक विधि)

प्रोफाइलिंग

  • python -m cProfile exrex.py '[a-zA-Z][a-zA-Z][a-zA-Z][a-zA-Z]' -o /dev/null
  • python -m cProfile exrex.py '[0-9]{6}' -o /dev/null
टूल डाउनलोड करें