diff --git a/src/libcamera/media_device.cpp b/src/libcamera/media_device.cpp
index 353f34a8..27180ca5 100644
--- a/src/libcamera/media_device.cpp
+++ b/src/libcamera/media_device.cpp
@@ -9,6 +9,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <regex>
 #include <stdint.h>
 #include <string>
 #include <string.h>
@@ -328,14 +329,17 @@ done:
  */
 
 /**
- * \brief Return the MediaEntity with name \a name
- * \param[in] name The entity name
- * \return The entity with \a name, or nullptr if no such entity is found
+ * \brief Return the MediaEntity with name matching the regex \a name
+ * \param[in] name Regex to match against the entity name
+ * \return The entity with name matching \a name, or nullptr if no such entity
+ * is found
  */
 MediaEntity *MediaDevice::getEntityByName(const std::string &name) const
 {
+	std::regex name_regex(name);
+
 	for (MediaEntity *e : entities_)
-		if (e->name() == name)
+		if (std::regex_search(e->name(), name_regex))
 			return e;
 
 	return nullptr;
diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
index 33279654..4868785d 100644
--- a/src/libcamera/v4l2_subdevice.cpp
+++ b/src/libcamera/v4l2_subdevice.cpp
@@ -1748,10 +1748,10 @@ const std::string &V4L2Subdevice::model()
  */
 
 /**
- * \brief Create a new video subdevice instance from \a entity in media device
+ * \brief Create a new video subdevice instance from an entity in media device
  * \a media
  * \param[in] media The media device where the entity is registered
- * \param[in] entity The media entity name
+ * \param[in] entity A regex that will match media entity name
  *
  * \return A newly created V4L2Subdevice on success, nullptr otherwise
  */
