Getting Some Values From Regexp?
Apr 10, 2011
"_anim(d+)$"
Ok, with that, I can check for any string that has the _anim suffix alright.
But I need to get the value inside the parenthesis (which I expect to be an integer). And I will also need to get the value before the _anim prefix (which I expect to be a string).
That is what I don't get: how do it "get" values, instead of just "knowing" there was a match?
View 1 Replies
ADVERTISEMENT
Sep 6, 2009
For the past 2 days i have been trying to come up with a simple solution for this problem, but i have turned up nothing so far.[code]What i am thinking now, is if there was a way to get the "name" and "value" field with the 1 regular expression, instead of having to do the 2, would that be possible?
View 4 Replies
Jan 1, 2010
Been at this for ages now experimenting different ways to do this, i have fields in my html file that look like:[code]is it possible for me to get both the numeric values 18621335 and the username graham23s in the same regular expression?
View 1 Replies
Jan 20, 2010
I have 2 strings:
"This is number 123456789"
"This is number 123456"
I want to match the last number "123456" and replace this. Not the first number because the length is > 6 digits. I have this regex "d{6}" but then he will match the first number also.
View 10 Replies
Jul 27, 2009
My problem is to extract some specific string from the web script by RegExp, e.g:
1. <TD title="ABC - SDC">Home Furniture</TD>
- I want to extract "Home Furniture" from here.
2. <TD><INPUT class=ID="( 8352623 ) Demark" value="( 8352623 ) Demark"></TD></TR><!-- <tr> -->
- I want to extract "8352623" from here, can be any of them.
How can I write a RegExp to match them?
And I am getting one solution but work out in C#, obviously it's not working in VB, so anyone does me a favor to translate them in VB structure...
string pattern1 = @"<([tT][dD])[^>]*>(?<between>.*)(?=</1>)";
string test1 = @"<TD title=""ABC - SDC"">Home Furniture</TD>";
if (Regex.IsMatch(test1, pattern1))
[Code]....
View 1 Replies
Apr 14, 2010
The code I am using is below: There is a failure somewhere in this code but I cannot "see" it
[Code]...
View 1 Replies
Mar 23, 2009
I have a DEM file(Digital Elevattion Model File) and I am trying to open the file,where we have Latitude and Longitude values inside the DEM file.And, Now I have opened the file using Filestream and Read the file using BinaryReader.But, I am having a trobule in getting the values of Latitude and Longitude.I am getting Byte values randomly as 1,202,31,271 etc.But, we dont have latitude and longitude values more than 180,and also I am not getting 16 bit UInt values.For example, the values should be like Latitude 20.00416666666667 and Longitude 39.99583333333333.So,read the correct Byte values of the DEM file.The code I have used till now is:
Dim fs As FileStream = New FileStream("C:UsersadminDesktopHeader and DEM fileE020N40.DEM", FileMode.Open, FileAccess.Read)
Dim rd As New BinaryReader(fs)
Dim convertDB As UInt16
For i = 0 To rd.BaseStream.Length
[code]....
View 14 Replies
Jun 2, 2011
lets say I have a form (form1) with lables a-z which are all designed with default text "0". So they all show 0 on program startup. which is fine. I also have a dialog with 2 TextBoxes; I want my program to update the default text/value on (only)form1 labels x, y and z to whatever was put into the textboxes when i press the OK button on the Dialog, so these specified labels show the 'new' value on next startup. Is it even possible or should I save the values to a file which loads the values in the specified labels on startup?
View 5 Replies
Apr 21, 2009
I have simple columns and their respective sums. However, I exclude 1 particular value from each sum, like so [code]...
Now I need to exclude another value ("Awaiting Progression") from a second column called "PROGRESSION".
Since I already exclude value based on 1 column called CATEGORY, how do I change my =Sum(Code.ExcludeOthers(Fields!CATEGORY.Value,Fields!ACTION_PLAN_NEW.Value)) to exclude a value from the PROGRESSION column if it's = ("Awaiting Progression") ?
i.e. How do I exclude multiple values, depending on values in 2 columns in SSRS 2005?
View 1 Replies
Apr 21, 2010
I want to be able to see if the values a user inputs into 2 textboxs equals the values assigned to a picture. I put these values in the picture's name and tag. Also the picturebox is getting the image from a random function correlating to an imagelist. How would i go about thisI thought of maybe using a checkbox and coding
If picturebox1.image.tag = ("12") _
and textbox1.text = 1 _
and textbox2.text = 2 Then
checkbox1.checked = true
unfortunatly when i debug it says the picturebox1.image.tag = Nothing
View 3 Replies
Jan 4, 2011
i have retrived this datatable from datasource and i want to add a more colum 'category'basedon the each value of each Role, like if role column has the value '90 daya client' then in the same row it should have a value 'DC' in the category column.n make a temporatry dt1 table but to add related values.
S.No First Name Last Name Role Date
1 Us er1Name User1Name 90 Day Client 11/01/2011
2 User1NameAtt1 User1NameAtt1 90 Day Client 11/01/2011
[code].....
View 1 Replies
Mar 28, 2011
I am creating a maths programs that draws graphs for the user. so far i have placed 22 values into an array and now i need to import them to excel, draw the graph and import the graph back into the program to display them.[code]...
View 4 Replies
Jul 14, 2009
I am using Visual Basic express edition 2008.I am trying to know if a value in a single dimensional array is repeated in the array. If yes, then multiply one of them by 100. For example:
MyArray (14) = 12, 15, 18, 15, 18, 11, 15, 18, 16, 14, 18, 8, 12, 17, 10
In the above example:
MyArray (1) = MyArray (3) = MyArray (6) = 15
MyArray (2) = MyArray (4) = MyArray (7) = MyArray (10) = 18
MyArray (0) = MyArray (12) = 12
[Code]...
View 8 Replies
Jul 15, 2011
I have a two different tables, Table 1 and table 2.
Table 1
-----------
Resource
Start Date
End date
[Code]....
Here I have to match the total hours of each table according to the resource,
then have to find the mismatched data and find difference with that values of mismatched data.
View 2 Replies
Mar 11, 2010
I'm not sure this is really the right place for this question but I couldn't find a general programming forum.Why are the numeric values -1 and 0 used to represent the logical values TRUE and FALSE?
View 6 Replies
Oct 27, 2010
I am creating an xml file with LINQ as follows...
Public Sub CreateXml()
Dim db As New MDataContext
Dim Customers = <gallery columns="3" rows="3">
[code]....
Could i mix local values with the ones returned from the LINQ query...Something like the following?
Public Sub CreateXml(ByVal **Col** As String, ByVal **Row** As String)
Dim db As New MDataContext
Dim Customers = <gallery columns="& **Col** &" rows="& **Row** &">
[code]...
View 1 Replies
Sep 22, 2011
In the following code I have two class scoped variables intCompanyID and intEmployeeID. When I set them to a value in btnFetch_Click then try to read them later in btnSubmit_Click they are set to zero.
Option Explicit On
Imports MySql.Data.MySqlClient
Imports System.Data
[code]....
View 2 Replies
Apr 4, 2010
I have an array of 10 x 10 as shown below. In addition to -1, it consists of numbers from 1 to 9.[code]...
View 6 Replies
Oct 28, 2010
I have a bunch of events with values (how many people went through a doorway). Each event is associated with a Date. There is no fixed period to the events .If no one comes through the door, no event is generated, but often multiple people can go through at once, so the value can be greater than one.
Sometimes events are minutes apart for a time, sometimes there is gaps of a few hours,
Using the Date class, is there an easy way to average my values over periods of time?
View 1 Replies
Apr 9, 2010
i have a form where a player can change the background colour of the space attack game when the go in to it i want it to take the form1.backcolor which i have done but i need a code that would take the RGB value from form1.backcolor and put into three variable's so it updates the scroll bars values and txt box values so that the player know what colour they had it if they want to go back to it
View 2 Replies
Jan 2, 2009
cast integer values to an array of enum values?
View 2 Replies
Mar 23, 2011
I bound datagridview to bindingsource. The bindingsource has its datasource a collection Called Rates which is a collection of Rate items. The rate object has a property called VALUE. I need the user to be able to edit different values for the collection; However, on the datagridview, i need to keep displaying on one column called OldValue the existing Rate value before the change while allowing the user to edit that value in a second column called NewValue.
In other terms, One colum OldValue will keep the existing values from the DB before being edited by the user, this column OldValue is readonly. Another column NewValue will display, the 1st time, the old value from the DB (similar to OldValue when we do the Fetch from the DB), but it`s editable column, so the user can modify each value in the column NewValue without overriding OldValue cells. For now, I bound both columns OldValue and NewValue to the same property VALUE of the Rate object,
[Code]...
View 3 Replies
Jul 26, 2010
I have a winform with richtextbox. I want to get the user input values in any window like chat programs(msn,yahoo,gtalk), Ms Word,...etc, and set the values into richtextbox?
View 3 Replies
Jun 16, 2010
Input a range of numbers and sort them into 6 equal amounts and then having the program tell you which amount the number was put into?
I.e
Input:
1200, 2400, 600, 600, 300, 300, 1200, 1200
Sorted into:
Group A: 2400 = 2400
Group B: 1200 + 1200 = 2400
Group C: 600 + 600 + 300 + 300 + 1200 = 2400
View 4 Replies
Apr 13, 2010
Am New To This Fourm So Forgive Me If I Have Put This In The Worng Place I HAve Been Programming For 3 Years And Need A Project I Am Doing.I Am Using Visual Basic 2008 Express EditionOutlineI Want To Be Able To Add A Dword Value To A Exsisting Location and add a value to that Dword Value
Example: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList and then Add a new Dword Value that is not there such as Administrator
[code].....
View 1 Replies
Apr 23, 2011
I'm trying to assign some parameters for a stored procedure with some values that are stored in a data table. in the code, I can set the parameter values to the data table, and give a column header or index without issue, but when it tries to execute at runtime it bombs out.the error I get is a variation on "Failed to Convert Parameter Value from a DataColumn to a String" depending on exactly how I try to assign the value.the data types are all correct elsewhere in the code.
my code for this bit is
Try
ConnectionAttempt.Open()
Try
With NewYearCommand_Dates
[code]....
other things I've tried to get this to work are all variations on the .Value=dates bit, such as
.Value=dates(0) (so using column index)
.Value=dates.columns(0) (again using column index)
I've also tried declaring variables, and setting their values to the values in the columns, but the code returns an error saying that "Value of type 'System.Data.DataColumn' cannot be converted to string".I should point out that i'm doing this for 3 tables at once in this sub, 2 of them will only have a single row of data, but the third has an indeterminate number of rows.I'm afraid I don't know what else to do. I'm lead to believe by my mate and my lecturer that this should work, and of course it will work, but the evidence says otherwise.
View 1 Replies
Jun 24, 2009
I have filled a DVG with information and added another column to index(8) pragmatically Now i want to create a combobox with values depending on values in other cells on the same row so each row will have a combo box with different selections. below i have placed the code and hoped someone would have some input on how to approach this. i have tried datagridviewcolumn but that fills every row with the same information regaurdless of a if statement
[Code]...
View 15 Replies
Sep 14, 2010
I am passing the degree values in the form of "123:09:89".I want to convert this value into its exact decimal value.
View 6 Replies
May 25, 2009
I'm using a pattern of buttons verticle, & horizonal, to produce a 2 dimensional matrix (6 deep, 25 wide .) The sequence is repeating, but offset from horizonal line to line. the values are 1 thru 12. there are corresponding files in the "My.resources." file carrying names related to the buttons. If the "my. Resources" filename is say.., "1,3,4,6,8,9,11,12 " & the buttons pushed have produduced the string "1","4","6" then the prestated file carries all these values, and therefore should be selected. All integers of the textbox list must be present in a "my.resources" file to show the file. There will be multiple files in the resource file that will fit. (My ultimate intention is to show all files that fit, somehow. I'll have to, eventually. I'm still writing this, and changing it constantly. )the question is, "How do I get the computer to link the textbox integers to the resources files? Textbox = "1", "4", "6" to My.Resources.1,3,4,6,8,9,11,12
View 1 Replies
Sep 13, 2011
[url]...base on the thread ive linked.
i am able to pass the checked value of the checked list box to a list box
my current problem is
i am going to save the values [ for instance mat_name ] on the listbox in the database
but i need the id [ for instance mat_id ] of that value
View 14 Replies