What Would Be The RegularExpression For The Followings

Aug 19, 2010

I have a nomenclature to respect while performing some tasks against the Active Directory.Here's the nomenclature:

TT-EEE-Mnemonic: if TT = 'GA' or 'GS' or 'PA' or 'PF' -> the schema to create is a "group", with a groupScope of Global.

[code].....

View 3 Replies


ADVERTISEMENT

RegularExpression To Convert From Fraction To Decimal

Jun 10, 2011

I need a RegularExpression that can convert a string from a fraction or decimal like "1/2" or "0.5" to a decimal "0.5". It needs to handle both cases. Input can be either fractional or decimal, output must be decimal.

View 3 Replies

RegularExpression To Convert From Fraction To Decimal?

Jan 28, 2011

I need a RegularExpression that can convert a string from a fraction or decimal like "1/2" or "0.5" to a decimal "0.5". It needs to handle both cases. Input can be either fractional or decimal, output must be decimal...

View 7 Replies

Regex - Form RegularExpression For Text Like Starts And Ends With #?

Jan 20, 2012

System.Text.RegularExpressions.Regex("#*#") is this correct..!? my text can be like #abc1234+as00# etc. ie, anything between #..#

View 4 Replies

.net - Modify RegularExpression To Parse VCard/vCalendar To Allow A Particular Field Type?

Sep 6, 2009

I have an vCard application that needs to read vCard Data, and have found a RegularExpression which gets the FieldName, Encoding and FieldValue from the file, here it is below:

^(?<FIELDNAME>[w-]{1,})(?:(?:;?)(?:ENCODING=(?<ENC>[^:;]*)|CHARSET=(?<CHARSET>[^:;]*))){0,2}:(?:(?<CONTENT>(?:[^
]*=
){1,}[^
]*)|(?<CONTENT>[^
]*))

This Regular Expression Reads these kind of values fine:

ORG:Company
FN;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:RoguePlanetoid

However I want it to read these values also

TEL;WORK;VOICE:0200 0000000

Without skipping them. How can I modify the RegularExpression so TEL;WORK;VOICE ends up as part of the "FIELDNAME" and 0200 0000000 is part of the "CONTENT".I am unfamiliar with complex RegularExpressions and cannot figure out how to modify it, there is a regular expression that gets these:

^(?:TEL)([^:]*):(?<TEL>[^
]*)

However it only gets the FieldName as "TEL" and I need the whole value for this so I can tell the numbers apart in my application.If possible the Regular Expression would read the WORK and VOICE elements also like the CHARSET and ENCODING in the current regular expression, so they can treated like an Attribute and Type for example, however anything which allows the Regular Expression to read the whole TEL;WORK;VOICE as the FIELDNAME will be fine.

Edit

^(?<FIELDNAME>[^:]{1,})(?:(?:;?)(?:ENCODING=(?<ENC>[^:;]*)|CHARSET=(?<CHARSET>[^:;]*))){0,2}:(?:(?<CONTENT>(?:[^
]*=
){1,}[^
]*)|(?<CONTENT>[^
]*))

Reads up to the first Colon which covers the Whole FieldName, however it would be nice to store each SemiColon Element in a seperate item such as ATTRIBUTE or TYPE.

View 5 Replies

Modify RegularExpression To Parse VCard/vCalendar To Allow A Particular Field Type?

Nov 18, 2009

modify RegularExpression to Parse vCard/vCalendar to allow a particular field type?

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved