{"id":26233604,"url":"https://github.com/nico-duitsmann/filter","last_synced_at":"2026-05-16T17:07:03.179Z","repository":{"id":56973150,"uuid":"140848977","full_name":"nico-duitsmann/Filter","owner":"nico-duitsmann","description":"Regular expression and pattern search.","archived":false,"fork":false,"pushed_at":"2018-07-13T13:48:12.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-04-24T13:22:08.974Z","etag":null,"topics":["grep","grep-search","pattern-matching","pattern-search","php7","regex-match","string-matching","string-search"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nico-duitsmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-13T13:15:23.000Z","updated_at":"2024-04-24T13:22:08.975Z","dependencies_parsed_at":"2022-08-21T07:10:31.557Z","dependency_job_id":null,"html_url":"https://github.com/nico-duitsmann/Filter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-duitsmann%2FFilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-duitsmann%2FFilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-duitsmann%2FFilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nico-duitsmann%2FFilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nico-duitsmann","download_url":"https://codeload.github.com/nico-duitsmann/Filter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243318782,"owners_count":20272144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grep","grep-search","pattern-matching","pattern-search","php7","regex-match","string-matching","string-search"],"created_at":"2025-03-13T01:16:41.895Z","updated_at":"2025-10-28T14:36:45.527Z","avatar_url":"https://github.com/nico-duitsmann.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Filter\n***NOTE*** This software is still `under developement`!\n\n[![Software License](https://img.shields.io/badge/license-GPLv3-brightgreen.svg?style=flat-square)](LICENSE)\n\n\nFilter is a php library to find string like patterns or regular expressions in strings, files, directorys and urls.\n\n## Install\n\nVia Composer\n\n``` bash\n$ composer require duitni/filter dev-master\n```\n\nManually\n\n``` php\nrequire 'Filter.class.php';\n\nuse \\Duitni\\Filter\\Search as Search;\n```\n\nOr via remote import\n``` php\neval(base64_decode('Ci8qKgogKiBSYXcgdXJsIGltcG9ydC4KICogQGF1dGhvciBOaWNvIER1aXRzbWFubgogKi8KCmZ1bmN0aW9uIHJhd19pbmNsdWRlKHN0cmluZyAkcmF3VXJsKSB7CiAgICAkdGVtcERpciAgPSBzeXNfZ2V0X3RlbXBfZGlyKCkuIi8ucmF3X2luY2x1ZGUiOwogICAgQG1rZGlyKCR0ZW1wRGlyKTsKICAgICRmaWxlTmFtZSA9ICIkdGVtcERpci8iLnVuaXFpZCgicmF3X2luY2x1ZGUiLCB0cnVlKS4iLnBocCI7CiAgICAkY29udGVudCAgPSBmaWxlX2dldF9jb250ZW50cygkcmF3VXJsKTsKICAgIGZpbGVfcHV0X2NvbnRlbnRzKCRmaWxlTmFtZSwgJGNvbnRlbnQpOwogICAgcmV0dXJuIGluY2x1ZGUgJGZpbGVOYW1lOwp9CgpmdW5jdGlvbiByYXdfaW5jbHVkZV9jbGVhbl9jYWNoZSgpIHsKICAgICRmaWxlcyA9IGdsb2Ioc3lzX2dldF90ZW1wX2RpcigpLiIvLnJhd19pbmNsdWRlLyoiKTsKICAgIGZvcmVhY2goJGZpbGVzIGFzICRmaWxlKSB7CiAgICAgICAgaWYoaXNfZmlsZSgkZmlsZSkpCiAgICAgICAgICAgIHVubGluaygkZmlsZSk7CiAgICB9Cn0K'));\nraw_include('https://raw.githubusercontent.com/nico-duitsmann/Filter/master/src/Filter.class.php');\n\nraw_include_clean_cache(); # at file end clearing cache\n```\nThe raw_include source can be found here:\u003cbr\u003e\n```https://gist.github.com/nico-duitsmann/f8f301b28389518ff10a5266f12b53cb```\n\n## Usage\n\n``` php\n$options = array(\n    'trimResult' =\u003e true\n);\n$search  = new Search($options, 'MyPattern', 'Subject1', 'Subject2', 'Subject3');\n$matches = $search-\u003egetMatches();\n$stats   = $search-\u003egetStats();\n\nforeach ($matches as $match) {\n    echo 'Found '.$match['pattern'].' on position '.$match['position'].' in '.$match['subject'].'\u003cbr\u003e';\n}\n\necho 'Scan finished in : '.$stats[0]['time'];\n```\n\nAvailable options\n``` php\n/*\n * patternIsRegex \u003e Search with regex instead of pattern\n * trimResult     \u003e Trim the outputted result\n * maxLineLen     \u003e Define max line length\n * colored        \u003e Colored output\n * hColor         \u003e Define highlight color\n*/\n\n// build options array\n$options = array(\n    'patternIsRegex' =\u003e false,\n    'trimResult'     =\u003e true,\n    'maxLineLen'     =\u003e 50 ,\n    'colored'        =\u003e true,\n    'hColor'         =\u003e 'red',\n);\n```\n\n***NOTE***: More examples can be find in `examples`. \n\n## Author\n\n- [Nico Duitsmann](https://github.com/nico-duitsmann)\n\n## License\n\nGNU General Public License v3. Please see [License File](LICENSE) for more information.\n\n## Disclaimer\n\nThe author takes NO responsibility and/or liability for how you choose to use any of the tools/source code/any files provided. The author and anyone affiliated with will not be liable for any losses and/or damages in connection with use of ANY files provided with Filter. By using Filter or any files included, you understand that you are AGREEING to that.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnico-duitsmann%2Ffilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnico-duitsmann%2Ffilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnico-duitsmann%2Ffilter/lists"}