Advertisement
LshySVK

RegEx a ALT Kódy

Jun 25th, 2024
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | Source Code | 0 0
  1. https://regexone.com/
  2. abc… Letters
  3. 123… Digits
  4. \d Any Digit
  5. \D Any Non-digit character
  6. . Any Character
  7. \. Period
  8. [abc] Only a, b, or c
  9. [^abc] Not a, b, nor c
  10. [a-z] Characters a to z
  11. [0-9] Numbers 0 to 9
  12. \w Any Alphanumeric character
  13. \W Any Non-alphanumeric character
  14. {m} m Repetitions
  15. {m,n} m to n Repetitions
  16. * Zero or more repetitions
  17. + One or more repetitions
  18. ? Optional character
  19. \s Any Whitespace
  20. \S Any Non-whitespace character
  21. ^…$ Starts and ends
  22. (…) Capture Group
  23. (a(bc)) Capture Sub-group
  24. (.*) Capture all
  25. (abc|def) Matches abc or def
  26.  
  27.  
  28. https://www.linguisticsweb.org/doku.php?id=linguisticsweb:tutorials:basics:regex:regex-notepad
  29. RegEx Effect Example
  30. a Find character ‘a’
  31. abc Find string abc
  32. […] Find any of ‘…’ [abc] finds characters ‘a’, ‘b’, or ‘c’
  33. [a-z] Find any in the range from ‘a’ to ‘z’ [a-f] finds any of the lowercase letters ‘a’ to ‘f’
  34. [^x] Find anything that is not ‘x’ [^aeiou] Finds all characters that are not vowels, including punctuation, digits and whitespace
  35. ? The previous element is optional, [1-9][0-9]? Finds numbers from 1 to 9 and 10 to 99
  36. it does not have to occur
  37. . Find any character except newline,
  38. linefeed, carriage return
  39. + Find the previous element 1 to many times r+ finds ‘r’, rr, rrr, rrrr, etc.
  40. * Find the previous element 0 to many times [a-zA-Z]*ed finds strings ending in ed
  41. {x,y} Repeat the previous element x to y times [0-9]{5,7} Finds any sequence of 5 to 7 digits.
  42. (…) Save anything inside the parentheses for (store this) finds and stores the string store this
  43. use in replacement
  44. \1 \2 \3 Restore the string saved by the \1ing adds ing to the saved string
  45. parentheses, for use in replacement
  46. \w Shortcut for word characters \w* finds cat, dog, login_name, cutie17, etc.
  47. (letters, digits and underscores)
  48. \d Shortcut for digits, same as [1-9]
  49. \b Marks the beginning or end of a word
  50. \ Escape the operator following ‘\’ \[\w*\] finds a word in brackets
  51.  
  52.  
  53. ALT Kody:
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement