Skip to content

Commit

Permalink
adding example using re.compile
Browse files Browse the repository at this point in the history
  • Loading branch information
bandophahita committed Apr 3, 2024
1 parent a323155 commit ef5efc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions screenpy/resolutions/matches.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ class Matches:
# matches "/product/1", "/product/22", "/product/942"...
See.the(Text.of_the(URL), Matches(r"/product/[0-9]{1,3}"))
)
# matches "/people/123/edit", "/people/2ec4efef-dec5-9d81bbcc410a/edit"
pattern = re.compile(r"/people/.+/edit")
the_actor.should(See.the(Text.of_the(URL), Matches(pattern))
"""

@property
Expand Down

0 comments on commit ef5efc3

Please sign in to comment.