Thanks for calling me *profoundly *astute. :)

If the developer wants to add more items to ignore, they can be safely
added within the square brackets.

My advice assumed that the file would be broken into separate lines, and
each item checked individually.

Also note, that as *Cereberus *did, by using the ^ symbol in front (and
outside the square brackets), that means beginning of item, and is not used
as a negation.

On 17 November 2011 07:35, Cerebrus <[email protected]> wrote:

> But then, Reuben has always been profoundly astute ! ;-)
>
> I agree mostly with Reuben but I do not concur with the suggestion to
> use the negated expression ([^a-z]+) because it exponentially inflates
> the list of what can be matched (e.g., blank spaces, newlines, and
> just about every symbol in existence). Instead, my approach would be
> to list out every special character that you would like to match
> (which IMHO should not be a very large list) and include it in the
> expression.
>
> For instance, I would use something like:
>
> ^[A-Z0-9$@#_&*]+$
>
> On Nov 16, 3:47 pm, Reuben Bartolo <[email protected]> wrote:
> > So... Regex.
> > The Regex class makes use of what is known as a state automaton. If you
> > want to learn more, (and I suggest that you should), you should check out
> > the book Mastering Regular Expressions.
> >
> > If you want to escape your input string to be checked via a regular
> > expression, use this method.
> http://msdn.microsoft.com/en-us/library/system.text.regularexpression...
> >
> > As for your question,
> > you should see it the other way round. You should NOT be looking to see
> if
> > they are all caps, since obviously you can have other chars. So what you
> > should do is make sure that there are no lower case.
> >
> > In Regex, the symbol ^ means NOT.
> > Therefore you should check [^a-z]+ to make sure the character are not
> lower
> > case,
> > and [^A-Z]+ to make sure they are not upper case.
> >
> > You should use the .IsMatch method to make sure you are checking the
> whole
> > input string.
> > That should be enough to get you started.
> >
> > Hope that Helps,
> > Reuben
> >
> > On 15 November 2011 18:41, William V <[email protected]> wrote:
> >
> >
> >
> > > I am trying to figure out how the MS Regular Expression class works,
> > > currently I am using this class in PowerBuilder and I need to check
> > > only text characters (not including #'s or special characters), if
> > > they are either all uppercase or all lowercase(doesn't matter what
> > > order).
> >
> > > For example, 'TESTER$10', 'W10E7EE'. If all characters are Ucase, give
> > > message and if all lowercase, give message.
> >
> > > I have used many different combinations with no success. In addition I
> > > have googled it and found different expressions, but they don't seem
> > > to work or I am totally misunderstanding how this works.
> >
> > >http://www.grymoire.com/Unix/Regular.html
> >
> > > I have tried this: '^[A-Z]+$'. This works with only characters, but
> > > once I add #'s or a special character it fails,
> > > iole_regexp.Test( as_teststring ) returns false.
> >
> > > Plus I have tried to use \w ('^\w[A-Z]+$')  'Match any word character'
> > > but that doesn't work once I add a # or special symbol.
> >
> > > I've tried this, '^(?=\w*[a-z])\w*$' , it works until I add a special
> > > character. (tester12 works, tester$12 doesn't work).
> >
> > > Any help would be much appreciated.
> >
> > > Thanks
> >
> > > --
> > > 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 athttp://megasolutions.net- Hide quoted
> text -
> >
> > - Show quoted text -
>
> --
> 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