Matching Specific Characters

Sort by

recency

|

86 Discussions

|

  • + 0 comments

    Shame to the authors of this quiz! regex [123][120][xs0][30Aa][xsu][.,] must return false on string 3000s.. you can check it on this site https://regex101.com/

  • + 0 comments
    Regex_Pattern = r'^[123][120][xs0][30Aa][xsu][.,]$'
    
  • + 0 comments
    Regex_Pattern = r'^[123][120][xs0][30Aa][xsu][\.\,]$'
    
    import re
    
    print(str(bool(re.search(Regex_Pattern, input()))).lower())
    
  • + 0 comments

    regex pattern = r'^[1,2,3][1,2,0][x,s,0][3,0,A,a][x,s,u][.,,]$'

  • + 0 comments

    Negating Character Classes ([^]) – Use ^ inside [] to match any character except those listed.
    - Example: [^a-z] matches anything that is not a lowercase letter.

    Ekbet16 login