Python Regex

Python library re can be used to search for regular expressions.

import re

Create a new pattern object with re.compile:

# match anything before at least one @ symbol,
# and at least one . after that.
emailpattern = re.compile("[^@]+@[^@]+.[^@]+")

Match against your text object or string literal with sub-object of re.compile() type .match:

Continue reading “Python Regex”

What is a byte?

🥪 Summary

  • A “Byte” is a grouping of 8bits“.
  • Some counts start at zero.
  • Set of Eight = { 0, 1, 2, 3, 4, 5, 6, 7 }
  • A grouping of 8 is known as an 🦑 octet.
  • 8 bits can represent number sets { 0 … 255 } and { (-128) … 127 }.
  • ASCII Encoding is an interpretation of the number set { 0 … 255 }.
  • Bit groupings are known as blocks.
  • Endianness is interpretation, most to least significant bit, or least to most significant bit, either big-endian or little-endian.

Continue reading “What is a byte?”