mukeshdak

2025-09-29_Regex

Jul 12th, 2025 (edited)
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
REG 0.80 KB | None | 0 0
  1. // Quantifiers in Regex
  2. . -> any one character.
  3. * -> zero or more
  4. + -> one or more
  5. ? -> zero or one
  6.  
  7. // javascript search is case sensitive by default.
  8. // Regex - modifiers or flag.
  9. i - case insensitive
  10. g - global match, does not stop after first occurance.
  11. m - multiline search.
  12. s - allow (.) to match new line character.
  13. u - switches on unicode pattern matching.
  14. y - switches on sticky mode.
  15.  
  16.  
  17. Quantifiers in Regex
  18. . -> any one character.
  19.  
  20. -> zero or more
  21. -> one or more ? -> zero or one
  22. javascript search is case sensitive by default.
  23. Regex – modifiers or flag.
  24. i – case insensitive
  25. g – global match, does not stop after first occurance.
  26. m – multiline search.
  27. s – allow (.) to match new line character.
  28. u – switches on unicode pattern matching.
  29. y – switches on sticky mode.
Advertisement
Add Comment
Please, Sign In to add comment