Python Forum
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regex Help
#2
name = re.compile('hello\b')
\b matches the empty string at a word boundary. This will still match 'shello', but you could put a \b at the beginning to stop that too.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Regex Help - by mp3909 - Sep-17-2017, 03:19 PM
RE: Regex Help - by ichabod801 - Sep-17-2017, 06:43 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020