RegularExpression to convert from Fraction to decimal Programming Software Development by tim8w 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... Re: RegularExpression to convert from Fraction to decimal Programming Software Development by sandeepparekh9 can u explain further .. where are you using this?? what appliction some.. screens or code? Re: RegularExpression to convert from Fraction to decimal Programming Software Development by tim8w sandeepparekh9, I have a DataGridView where the user can enter either fractional info like "1 1/2", "3/4", etc. or decimal values lime "1.5", 0.75", etc. The problem is that I need the data stored as decimal... Re: RegularExpression to convert from Fraction to decimal Programming Software Development by tim8w I ended up using four different RegEx to catch all the cases: [CODE] sPattern = "((?<whole>\d+) (?<num>\d+)/(?<den>\d+))" ' 1 1/2 case regExp = New System.Text.RegularExpressions.Regex(sPattern, RegexOptions.Compiled) m = regExp.Match(dgvc.Value) If m.Success Then dDecValue = CInt(m.Groups("whole&… RegularExpression => Graphing Data Programming Software Development by Bombshock Heya Daniweb, I've been working on Regular Expressions, thanks to cghtkh who told me about them. I've used resources from: [URL="Newthinktank.com"]NewThinkTank.com[/URL] [URL="http://docs.python.org/library/re.html"]Python Regular Expression Documentation[/URL] and [URL="daniweb.com"]Daniweb.com[/URL]! I figured I'd… Re: RegularExpression => Graphing Data Programming Software Development by griswolf [CODE]import re #Imports the Regular Expression Library f = open('randomcharacters.txt') #Opens "randomcharacters.txt" from same directory as the script lineToSearch = "" for line in f: lineToSearch += line #Goes through all the lines in the data one by one pingFinderPattern = re.compile('time=([0-9.]+) ms') Pattern1 = re.… Re: RegularExpression => Graphing Data Programming Software Development by TrustyTony subtle issue: it is better not to build the list if it is not saved for future, join is happy with generator: [CODE]import re # use regex package pingPatternRe = re.compile('=([0-9.]+) ms') # compile the pattern I want to recognize with open('randomcharacters.txt') as f: # open the file so as to ensure it gets closed print("\n".join(… duplicate symbol Programming Software Development by etc123 …: .LeafNode::LeafNode(const char*) ld: 0711-224 WARNING: Duplicate symbol: .RegularExpression::RegularExpression(co nst char*) ld: 0711-224 WARNING: Duplicate symbol…: .RegularExpression::Init(const char*) ld: 0711-224 WARNING: Duplicate symbol: .UnaryNode::~… form validation using jQuery in MVC Programming Web Development by sakhi kul …[Required] [DisplayName (" Employee Name")] [StringLength(15)] [RegularExpression("[a-zA-Z]{5-15}", ErrorMessage = "Entar…; } [Required] [DisplayName("Contact Number")] [RegularExpression("^9[0-9]{8}$",ErrorMessage="Entar valid… datediff in asp.net Programming Web Development by dougancil I have two text boxes starttimeInput and endtimeInput that have regularexpression validators to only accept input of time variables (11:00 … Re: Email validator Programming Software Development by Ramy Mahrous [code=C#]using System.Text.RegularExpression;[/code] [code=vb.net]Imports System.Text.RegularExpression[/code] Re: need Python Help !! Programming Software Development by griswolf …],[/ICODE] You cannot use [ICODE]aString.index(regularExpression)[/ICODE] but must use [ICODE]match = regularExpression.search(aString)[/ICODE]. Once you have a… Re: Limitation Programming Web Development by Bigras … the same with RegularExpressionValidator but it will use this "RegularExpression" to make sure the input string is valid (using… Re: Formatting Strings Programming Software Development by Aun Muhammad this can be achieved by use of "System.Text.Regularexpression"namespace and by using "Regex" class of this namespace.you can use meyhods of this class to help fulfill tasks :regards Re: Formatting Strings Programming Software Development by Aun Muhammad this can be achieved by use of "System.Text.Regularexpression"namespace and by using "Regex" class of this namespace.you can use methods of this class to help fulfill tasks :regards Re: exclude comments using Regular Expressions Programming Software Development by shuchimuley i gotta use regex.match(regularexpression) . I am using a streamreader to read the whole file … Re: Need help displaying single database values Programming Web Development by hollystyles … does not make the input safe, you must use a RegularExpression validator or your own custom method Public Sub makeSafe(input… Re: Need Email validation source code (C#) Programming Software Development by chirag.3g hi, Prasadd Use `RegularExpression.RegEx` class here is example for Email validation that i … Re: code for validation(asp.net 3.5) Programming Software Development by virang_21 use RegularExpression validators or simply set textbox's maxlenght property to 12 and 8 respectively. Re: validation Programming Web Development by b1izzard Use built-in validators like: compare validtor RegularExpression validator Re: validation Programming Web Development by kvprajapati [QUOTE=ravi89;886726]Use built-in validators like: compare validtor RegularExpression validator[/QUOTE] Set UICulture & Culture - Globalization/Localization. [CODE=ASP.NET] <%@ Page Language="C#" .... UICulture="en-GB" Culture="en-GB" ....%> ... .. [/CODE] Re: Extract SWF from website Automatically Programming Web Development by essential If you have enough experience in using (AJAX+RegularExpression), then i can say&#8212;it's not that … Re: email address validation Programming Software Development by kvprajapati Welcome erictheking1. You should post your question in ASP.NET forum. Regarding to your problem you must have use javascript with RegExp (regular expression) pattern or RegularExpression Validator control. Re: need to validate text box Programming Software Development by Ramy Mahrous My solution Danny is more scalable Don't depends on current requirements and you should have some flexibility I argue using RegularExpression pattern = ..... Then if this text matches the pattern return true to accept the value otherwise false. I'll do code snippet for it soon. Re: How to set the minimum and maximum lengh of the textbox Programming Web Development by Ramesh S You can use a RegularExpression validation for this purpose. [code] <asp:TextBox ID="… Re: Need help for Regular Expression Programming Web Development by suryasasidhar write in regularexpression ^[0-9]{9}[a-zA-Z]$ i t will work for u Re: JavaScript Validation on Textbox Programming Web Development by suryasasidhar hi saradha add this code to regularexpression ' \w{6}\d{6}' and it will work if not send message Re: asp.net login some part coding Programming Web Development by guru_sarkar 1: not sure if you want that regularExpression for email. If you select RgexValidator in Designmode and look at ValidationExpression propertie you can select Internet Email address [CODE]i.e. \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*[/CODE] 2: You BirthDate validator had Value 1970-1999 but your error message says 1900-1999. Re: How to set the minimum and maximum lengh of the textbox Programming Web Development by kailasgorane [QUOTE=Ramesh S;993164]You can use a RegularExpression validation for this purpose. [code] <asp:TextBox ID="… Re: How textbox can accept only numbers i have tried the searched code but now working Programming Web Development by zid8ne you can use System.Text.RegularExpressions.Regex or RegularExpressionValidator Control here are some sample link of regularexpression [url]http://regexlib.com/DisplayPatterns.aspx?cattabindex=2&categoryId=3[/url]