DLP Regex Practice Questions

Use regular expressions to build detection signatures for data leak prevention

Last Update Unknown

DLP Regex Practice Questions

Q1: Which reg expression will exactly match "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9_%+-]":

Select one:

Reveal Answer

The correct answer is: fred@h

Q2: For data states, files stored on disk systems are ...:

Select one:

  • Data at-rest
  • Data in-motion
  • Data in-process
Reveal Answer

The correct answer is: Data at-rest

Q3: Which reg expression will match "444.322.5431":

Select one:

  • \d{3}[-.]?\d{3}[-.]?\d{4}
  • \d{4}[-.]?\d{4}[-.]?\d{4}
  • \d{3}[-.]?\d{4}[-.]?\d{4}
  • \d{4}[-.]?\d{3}[-.]?\d{4}
  • \d{5}[-.]?\d{5}[-.]?\d{4}
Reveal Answer

The correct answer is: \d{3}[-.]?\d{3}[-.]?\d{4}

Q4: Which regular expression will match "1A":

Select one:

  • [a-z0-9]{1-2}
  • [a-zA-Z0-9]{1,3}
  • [a-zA-Z0-9]{4}
  • [a-zA-Z0-9]{0,1}
  • [a-z0-9][a-z0-9][a-z0-9]
Reveal Answer

The correct answer is: [a-zA-Z0-9]{1,3}

Q5: Which reg expression will exactly match a MAC address of "01:23:45:67:89:ab":

Select one:

  • ([0-9a-f][0-9]:){5}([a-fA-F][a-fA-F])
  • ([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])
  • ([0-9a-fA-F][0-9a-fA-F]:){4}([0-9a-fA-F][0-9a-fA-F])
  • ([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9A-F])
Reveal Answer

The correct answer is: ([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])

Q6: Which reg expression will match "[a-zA-Z\.]+\.(com|net|uk)":

Select one:

  • amazon.co.uk
  • mit.edu
  • ibm.co
  • falkirk@home
  • amazon.cn
Reveal Answer

The correct answer is: amazon.co.uk

Q7: Which is the best for a US telephone number (which has a three digital area code and a 7 digit local number:

Select one:

  • \d{4}[-.]?\d{4}[-.]?\d{4}
  • \d{4}[-.]?\d{3}[-.]?\d{4}
  • \d{3}[-.]?\d{4}[-.]?\d{4}
  • \d{5}[-.]?\d{5}[-.]?\d{4}
  • \d{3}[-.]?\d{3}[-.]?\d{4}
Reveal Answer

The correct answer is: \d{3}[-.]?\d{3}[-.]?\d{4}

Q8: For data states, programs running in memory are ...:

Select one:

  • Data in-process
  • Data at-rest
  • Data in-motion
Reveal Answer

The correct answer is: Data in-process

Q9: Which is the best regular expression for an IP address:

Select one:

  • [1-9]{1,3}\.[1-9]{1,3}\.[1-9]{1,3}.[1-9]{1,3}
  • [a-z]{1,3}\.[a-z]{1,3}\.[a-z]{1,3}.[a-z]{1,3}
  • [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}.[0-9]{1,3}
  • [0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}.[0-9]{1,2}
  • [0-9]{0,3}\.[0-9]{0,3}\.[0-9]{0,3}.[0-9]{0,3}
Reveal Answer

The correct answer is: [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}.[0-9]{1,3}

Q10: For data states, network packets are ...:

Select one:

  • Data in-motion
  • Data in-process
  • Data at-rest
Reveal Answer

The correct answer is: Data in-motion