Regex

From Vague Hope Wiki
Revision as of 03:30, 1 September 2011 by Haku (Talk | contribs) (Created page with "<pre> special characters: [\^$.|?*+() line start: ^ line end: $ almost any character (not line brakes): * [^\n] repeat last character: + (greedy) +? (lazy) match betw...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
special characters:
	[\^$.|?*+()

line start:
	^

line end:
	$

almost any character (not line brakes):
	*
	[^\n]

repeat last character:
	+ (greedy)
	+? (lazy)

match between braces (inclusive, over multiple lines):
	{[^}]*}

look around:
	q(?=u) matches the q in question, but not in Iraq
	q(?!u) matches q in Iraq but not in question
	(?<=a)b matches the b in abc.
	(?<!a)b fails to match abc.

Ivy:
	organisation="(?!i)