Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Data Science
  3. Question
Data Science

List all the identifiers for characters required in patterns?

Asked by Miura Baba Jan 5, 2020 1.8K views 1 answer
Share

Your answer

1 Answer

Nitin Solanki JanBask Expert Latest answer

Answered on Nov 17, 2019

Characters such as a digit or a single string have different codes that represent them. We can use these to build up a pattern string. Notice how these make heavy use of the backwards slash ‘’. Because of this when defining a pattern string for regular expression we use the format:

army pattern'

Placing the r in front of the string allows python to understand that the in the pattern string are not meant to be escape slashes.

Below there is a table of all the possible identifiers:


Was this helpful?

More Data Science discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Data Science Blogs

Guides, tips and career advice on Data Science from JanBask experts.