---
title: "Discussion on \"Rspec and Capybara: how to use regex or stop caring about whitespaces\" | Hashnode"
description: "Discussion on \"Rspec and Capybara: how to use regex or stop caring about whitespaces\". I recently updated from Slim template to ERB to use Herb (Thanks Marco).\nI had to update a test that was very strict on the format. I realized that Capybara::Node::Simple doesn’t provide a selector for regex.\nThe page object doesn’t have a match? met..."
url: "https://hashnode.com/posts/rspec-and-capybara-how-to-use-regex-or-stop-caring-about-whitespaces/692574a9afcbc3c08e358224"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Rspec and Capybara: how to use regex or stop caring about whitespaces](https://blog.brennetot.com/rspec-and-capybara-how-to-use-regex-or-stop-caring-about-whitespaces?utm_source=hashnode&utm_medium=feed)

I recently updated from Slim template to ERB to use Herb (Thanks Marco). I had to update a test that was very strict on the format. I realized that Capybara::Node::Simple doesn’t provide a selector for regex. The page object doesn’t have a match? met...

Nov 25, 2025 · 1 min read · blog.brennetot.com  
Read the article

-   [#rspec](https://hashnode.com/tag/rspec)
-   [#capybara](https://hashnode.com/tag/capybara)
-   [#rails](https://hashnode.com/tag/rails)

## Written by

[Thomas Brennetot](https://hashnode.com/@Damax)

@Damax · Tokyo, Japan

  
[View profile](https://hashnode.com/@Damax)

Rails excellence with innocence

10+ years most with Ruby on Rails and JavaScript frontend and some Go. My first language is C for 3 years in university.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
