Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \d{5} -- would match a substring of five digits
- \d{,4} -- would match a substring of zero to four digits
- \d{6,} -- would match a substring of at least six digits
- \x03 (3) -- matches the color symbol (mIRC's ctrl+k)
- \x02 (2) -- matches the bold symbol (mIRC's ctrl+b)
- \x0f (15) -- matches the control-code strip character (mIRC's ctrl+o)
- \x1f (31) -- matches the underline symbol (mIRC's ctrl+u)
- \x16 (22) -- matches the reverse symbol (mIRC's ctrl+r)
- \x1d (29) -- matches the italics symbol (mIRC's ctrl+i) (mIRC 7 only)
- (a)\1\1\1 -- the \1 would match a previous group, the first one for \1, 2nd for \2, etc. as if for duplicates in a string, in this case: aaaa
- Text: 'joey the joelster wanted to get a cup of joe'
- Regex1: (joe)y the \1lster wanted to get a cup of \1 -- Simple grouping example
- Regex2: (joe)y (t)h(e) \1ls\2\3r w(a)n\2\3d \2(o) g\3\2 \4 cup \5f \1 -- As you see, abuse of grouping (please don't do this!!)
- Regex3: (joe.*?){3} -- Serious inclusion abuse to match three uses of 'joe' followed by some set of unknown text.
- Regex4: [Jj]oey the [Jj]oelster wanted to get a cup of joe -- Example of potentially unknown capitalization of a word
- Regex5: joey.the.joelster.wanted.to.get.a.cup.of.joe -- Would allow for potential replacement of the spaces with underscores
- (aab){5} -- would match the repeating substring of 'aabaabaabaabaab'
- * = 0-inf
- + = 1-inf
- . = 1
- ? = 0 or 1
- Special characters: [\^$.|?*+()
- [] -- match single character of contents, EX [a-z] matches any lower case letter
- [^] -- excludes contents, EX [^a-z] excludes lower case letters from match
- \d -- single digit, [0-9]
- \w -- single alphanumeric or underscore, [A-Za-z0-9_]
- \s -- space, tab, hardspace (chr 160)
- \t -- tab (0x09)
- \r -- return carriage (0x0D)
- \n -- line feed (0x0A)
- \b -- match word boundry, -, and more !!!!!DON'T USE!!!!!
- \xFF -- FF being hexidecimal value for a character
- ^ -- start of string
- $ -- end of string
- //i -- case insensetive
- //S -- strip
- //g -- global search
- \l lowercase next char (think vi)
- \u uppercase next char (think vi)
- \L lowercase till \E (think vi)
- \U uppercase till \E (think vi)
- \E end case modification (think vi)
- \Q quote (disable) pattern metacharacters till \E
Advertisement
Add Comment
Please, Sign In to add comment