BeautifulSoup document has an error
Bug #1651050 reported by
李宏杰
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Document link:https:/
'If you pass in a regular expression object, Beautiful Soup will filter against that regular expression using its match() method.'
By tested it, BeautifulSoup use search() method rather than match() method.
And if it use match(), there is no need use '^' in the example:
import re
for tag in soup.find_
print(tag.name)
# body
# b
Changed in beautifulsoup: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
You're correct; 'match' in the documentation should be 'search'.