diff --git a/app/Http/Controllers/ToolController.php b/app/Http/Controllers/ToolController.php
index 8d6782c..13d83e9 100644
--- a/app/Http/Controllers/ToolController.php
+++ b/app/Http/Controllers/ToolController.php
@@ -69,6 +69,12 @@ public function index(): View
'route' => 'tools.code-editor',
'icon' => 'editor',
],
+ [
+ 'name' => 'Regex Tester',
+ 'description' => 'Test and debug regular expressions with live matching',
+ 'route' => 'tools.regex',
+ 'icon' => 'regex',
+ ],
];
return view('home', compact('tools'));
@@ -123,4 +129,9 @@ public function codeEditor(): View
{
return view('tools.code-editor');
}
+
+ public function regex(): View
+ {
+ return view('tools.regex');
+ }
}
diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php
index 7de13c3..c2600f0 100644
--- a/resources/views/home.blade.php
+++ b/resources/views/home.blade.php
@@ -84,6 +84,12 @@
@break
+ @case('regex')
+
+ @break
@endswitch
diff --git a/resources/views/tools/regex.blade.php b/resources/views/tools/regex.blade.php
new file mode 100644
index 0000000..ac75c13
--- /dev/null
+++ b/resources/views/tools/regex.blade.php
@@ -0,0 +1,328 @@
+@extends('layouts.app')
+
+@section('title', 'Regex Tester - Test Regular Expressions Online | Dev Tools')
+@section('meta_description', 'Free online regex tester. Test and debug regular expressions with live matching, syntax highlighting, and match details. Supports JavaScript regex flags.')
+@section('meta_keywords', 'regex tester, regular expression tester, regex online, regex debugger, pattern matching, regex validator, javascript regex')
+
+@push('schema')
+
+@endpush
+
+@section('content')
+
+
+
+
Regex Tester
+
Test and debug regular expressions with live matching
+
+
← Back
+
+
+
+
+
+
+
+
+
+ /
+
+ /
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ matches
+
+
+
+
+
+
+
+
+
+
+ No matches found
+
+
+
+
+
+
+ Match
+
+
+ Index:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@endsection
+
+@push('scripts')
+
+@endpush
diff --git a/routes/web.php b/routes/web.php
index ebacbfc..7c8961e 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -16,6 +16,7 @@
Route::get('/hash', [ToolController::class, 'hash'])->name('hash');
Route::get('/url', [ToolController::class, 'url'])->name('url');
Route::get('/code-editor', [ToolController::class, 'codeEditor'])->name('code-editor');
+ Route::get('/regex', [ToolController::class, 'regex'])->name('regex');
});
// Static Pages
@@ -36,6 +37,7 @@
['loc' => route('tools.hash'), 'priority' => '0.8', 'changefreq' => 'monthly'],
['loc' => route('tools.url'), 'priority' => '0.8', 'changefreq' => 'monthly'],
['loc' => route('tools.code-editor'), 'priority' => '0.9', 'changefreq' => 'monthly'],
+ ['loc' => route('tools.regex'), 'priority' => '0.8', 'changefreq' => 'monthly'],
['loc' => route('about'), 'priority' => '0.5', 'changefreq' => 'monthly'],
['loc' => route('privacy'), 'priority' => '0.3', 'changefreq' => 'yearly'],
];
diff --git a/tests/Feature/WebRoutesTest.php b/tests/Feature/WebRoutesTest.php
index 5acbe3a..71c4bf8 100644
--- a/tests/Feature/WebRoutesTest.php
+++ b/tests/Feature/WebRoutesTest.php
@@ -28,6 +28,7 @@ public function test_home_page_displays_all_tools(): void
$response->assertSee('Hash Generator');
$response->assertSee('URL Encoder');
$response->assertSee('Code Editor');
+ $response->assertSee('Regex Tester');
}
public function test_home_page_has_tool_links(): void
@@ -44,6 +45,7 @@ public function test_home_page_has_tool_links(): void
$response->assertSee('href="' . route('tools.hash') . '"', false);
$response->assertSee('href="' . route('tools.url') . '"', false);
$response->assertSee('href="' . route('tools.code-editor') . '"', false);
+ $response->assertSee('href="' . route('tools.regex') . '"', false);
}
public function test_csv_tool_page_loads(): void
@@ -230,9 +232,29 @@ public function test_code_editor_has_required_elements(): void
$response->assertSee('monaco-container');
}
+ public function test_regex_tool_page_loads(): void
+ {
+ $response = $this->get('/tools/regex');
+
+ $response->assertStatus(200);
+ $response->assertSee('Regex Tester');
+ $response->assertSee('Test and debug regular expressions');
+ }
+
+ public function test_regex_tool_has_required_elements(): void
+ {
+ $response = $this->get('/tools/regex');
+
+ $response->assertStatus(200);
+ $response->assertSee('Regular Expression');
+ $response->assertSee('Test String');
+ $response->assertSee('Common Patterns');
+ $response->assertSee('Match Details');
+ }
+
public function test_all_pages_have_navigation(): void
{
- $pages = ['/', '/tools/csv', '/tools/yaml', '/tools/markdown', '/tools/sql', '/tools/base64', '/tools/uuid', '/tools/hash', '/tools/url', '/tools/code-editor'];
+ $pages = ['/', '/tools/csv', '/tools/yaml', '/tools/markdown', '/tools/sql', '/tools/base64', '/tools/uuid', '/tools/hash', '/tools/url', '/tools/code-editor', '/tools/regex'];
foreach ($pages as $page) {
$response = $this->get($page);
@@ -244,7 +266,7 @@ public function test_all_pages_have_navigation(): void
public function test_all_pages_have_theme_toggle(): void
{
- $pages = ['/', '/tools/csv', '/tools/yaml', '/tools/markdown', '/tools/sql', '/tools/base64', '/tools/uuid', '/tools/hash', '/tools/url', '/tools/code-editor'];
+ $pages = ['/', '/tools/csv', '/tools/yaml', '/tools/markdown', '/tools/sql', '/tools/base64', '/tools/uuid', '/tools/hash', '/tools/url', '/tools/code-editor', '/tools/regex'];
foreach ($pages as $page) {
$response = $this->get($page);
@@ -257,7 +279,7 @@ public function test_all_pages_have_theme_toggle(): void
public function test_all_pages_load_vite_assets(): void
{
// Code editor uses standalone template without Vite
- $pages = ['/', '/tools/csv', '/tools/yaml', '/tools/markdown', '/tools/sql', '/tools/base64', '/tools/uuid', '/tools/hash', '/tools/url'];
+ $pages = ['/', '/tools/csv', '/tools/yaml', '/tools/markdown', '/tools/sql', '/tools/base64', '/tools/uuid', '/tools/hash', '/tools/url', '/tools/regex'];
foreach ($pages as $page) {
$response = $this->get($page);
@@ -270,7 +292,7 @@ public function test_all_pages_load_vite_assets(): void
public function test_all_tool_pages_have_back_link(): void
{
// Code editor uses standalone template with home link instead of back
- $toolPages = ['/tools/csv', '/tools/yaml', '/tools/markdown', '/tools/sql', '/tools/base64', '/tools/uuid', '/tools/hash', '/tools/url'];
+ $toolPages = ['/tools/csv', '/tools/yaml', '/tools/markdown', '/tools/sql', '/tools/base64', '/tools/uuid', '/tools/hash', '/tools/url', '/tools/regex'];
foreach ($toolPages as $page) {
$response = $this->get($page);