regex: match a value between two strings

how to capture a value, by group name, between two known string patterns
regex :

Regex re = new Regex(“str1(?.*?)str2”,RegexOptions.Singleline);

foreach (Match m in re.Matches(data)) {
Console.WriteLine(m.Groups[“val”].Value );
}

Advertisements

Article : Two Factor Theory

Two Factor Theory (also known as Herzberg’s Motivation-Hygiene Theory) – job satisfaction and job dissatisfaction acted independently of each other. Two Factor Theory states that there are certain factors in the workplace that cause job satisfaction, while a separate set of factors cause dissatisfaction. (Herzberg, Mausner & Snyderman 1959)

Two Factor Theory distinguishes between:

  • Motivators; (e.g. challenging work, recognition, responsibility) which give positive satisfaction, and
  • Hygiene factors; (e.g. status, job security, salary and fringe benefits) which do not give positive satisfaction, although dissatisfaction results from their absence.

Essentially, hygiene factors are needed to ensure an employee is not dissatisfied. Motivation factors are needed in order to motivate an employee to higher performance, Herzberg also further classified our actions and how and why we do them, for example, if you perform a work related action because you have to then that is classed as movement, but if you perform a work related action because you want to then that is classed as motivation.

Ref: http://en.wikipedia.org/wiki/Two_factor_theory