{"action":"opened","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/11347","labels_url":"https://api.github.com/repos/laravel/framework/issues/11347/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/11347/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/11347/events","html_url":"https://github.com/laravel/framework/issues/11347","id":122110915,"number":11347,"title":"InteractsWithPages::see() does not accept regexes","user":{"login":"carlosafonso","id":1700229,"avatar_url":"https://avatars.githubusercontent.com/u/1700229?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosafonso","html_url":"https://github.com/carlosafonso","followers_url":"https://api.github.com/users/carlosafonso/followers","following_url":"https://api.github.com/users/carlosafonso/following{/other_user}","gists_url":"https://api.github.com/users/carlosafonso/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosafonso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosafonso/subscriptions","organizations_url":"https://api.github.com/users/carlosafonso/orgs","repos_url":"https://api.github.com/users/carlosafonso/repos","events_url":"https://api.github.com/users/carlosafonso/events{/privacy}","received_events_url":"https://api.github.com/users/carlosafonso/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-14T19:19:02Z","updated_at":"2015-12-14T19:19:02Z","closed_at":null,"body":"Hi,\r\n\r\nI'm pretty sure there's a sensible reason for this, but the `see()` method in the `InteractsWithPages` trait does not allow custom regular expressions, as anything passed to it will be automatically escaped and converted to a regular expression of its own.\r\n\r\nI like how fluent the `see()` method is when testing, but sometimes I'd like to be less restrictive when testing the presence of a string in a rendered view. Consider this example:\r\n\r\n```php\r\npublic function testFooIsCreated()\r\n{\r\n    $this->doThis()\r\n        ->doThat()\r\n        ->see('/Foo with ID .* has been created/i');\r\n}\r\n```\r\n\r\nI can test the above with `assertRegExp`, but I love the fluent syntax of Laravel's test helpers.\r\n\r\nHow about a new method (something like `seeRegex()`) or modifying `see()` to allow this? I can contribute with a PR if the maintainers find it appropriate.\r\n\r\nThank you."}}