Regex regMutli = new
Regex(@"STRT\s+\.",RegexOptions.Multiline|RegexOptions.IgnoreCase);

    string text = @"textSTRT    .biufeoadfagea";
    Match m = regMutli.Match(text);
    Console.WriteLine(m.Index); // output 4


2011/6/20 Cerebrus <[email protected]>

> I can give you the regex because it takes an iota of mental effort to
> make this one:
>
> STRT\s+\.
>
> But I won't write the code for you because it takes an iota of effort
> (on your part) to find the code online. And since this is a "live and
> death" situation, you should be prepared to travel to the moon.
>
> On Jun 20, 6:31 pm, akki <[email protected]> wrote:
> > how to generate a regular expression that will scan a ful text
> > file(say sample.txt) and return the index of first occurance of STRT
> > follwed by any number of spaces and then a . That means it can be like
> > STRT<5 spaces>. or it can be like STRT<10 spaces>.
> >
> > Requirement is highly urgent, something like a live or death
> > situation. Please anyone good at regular expression in C#(or any way
> > in C# to do this) respond ASAP.
> >
> > A lot of thanks in advance,
> > Akki J
>
> --
> You received this message because you are subscribed to the Google
> Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
> Web Services,.NET Remoting" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
> or visit the group website at http://megasolutions.net
>

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to