Regex ignore first character Add a Is it possible to skip a couple of characters in a capture group in regular expressions? I am using . *)$ Replace with \1 Explanation: The search is: ^ - Beginning of the line \s - A whitespace character * - 0 or more of them (- Begin a capture group\w - A word character ([a-z] or [A-Z]) - Any character * - 0 or more of them) - End our capture group $ - End of the line Replace with: I tried the regexp (^Option,. Commented Oct 17, 2017 at 13:05. Alternate - match either a or b. * simply matches whole string from beginning to end if blacklisted character is not This match also the firts space after the word "intro". ) Bug Alert! The regular expression [^Z] matches all characters other than capital 'Z'. Viewed 26k times 3 . Look behind to make sure it has a whitespace character behind it (i. Regex in JMeter - To capture a particular field after a pattern match This should work: ^[^\s]+(\s+[^\s]+)*$ If you want to include character restrictions: ^[-a-zA-Z0-9-()]+(\s+[-a-zA-Z0-9-()]+)*$ Explanation: the starting ^ and ending $ denotes the string. *$ Explanation: (?!. gshij msjm odsso xzoclh tiskpnd wzft bxrv yjfzyjh gksm rbkjet agpr vidl isonc pygne htd