-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No empty {} placeholders #138
Comments
Would this achieve what you want ? pattern = ">{:opt}<"
html = "<p><strong>George</strong> is a <em>beautiful</em> cat</p>"
print(''.join(part[0] for part in findall(pattern, html,extra_types=dict(opt=with_pattern(r'.*?')(lambda x:x))))) outputs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Let us suppose that I write
I get
Mr. George is a beautiful
To fix that I can write
and now I get
Mr. George is a beautiful cat
However, if I write
I get
<strong>George is a beautiful cat
It looks like the {} placeholder does not like to be empty.
The text was updated successfully, but these errors were encountered: