Regular Expressions 101

Community Patterns

There does not seem to be anything here

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
((?:[\t ]*(?:R|RE|F|FW|FWD):[\t ]*)*)(.*)
/
gmi

Description

C# Code Sample:

var subject = "RE: RE:Fw:             RE:FW: FWD: re: This is a message from a long thread re: asdf ";
var pattern = @"((?:[\t ]*(?:R|RE|F|FW|FWD):[\t ]*)*)(.*)";
var regex = new Regex(pattern, RegexOptions.ECMAScript | RegexOptions.IgnoreCase);
var match = regex.Match(subject);
var extracted = match.Groups[2].Value;

extracted value: This is a message from a long thread re: asdf

Submitted by safeer - 6 years ago