Spot The Regex Misstake?

Oct 17, 2010

Can any one spot the miss takePrivate firstRegex As String = [wd]+.json?mbed_type=website_unknown"

View 5 Replies


ADVERTISEMENT

Cant Seem To Spot Regex Miss

Oct 20, 2011

I cant seem to spot my regex miss take(always been poor at RX). Is only passing the first expression. I assume it's because i am passing both expressions with "text". [code]

View 1 Replies

Can't Spot The 'Overflow Exception'

Aug 27, 2011

I get an 'overflow exception was unhandled' error in the following code.

It is a function to combine 2 bytes into a 16 bit integer.

Private Function MakeInt16(HiVal As Byte, LoVal As Byte) As Short
Dim h As UInt32 = HiVal * CUInt(256) + LoVal
Return CShort(h)
End Function

View 4 Replies

Click A Certain Color Spot?

Nov 15, 2011

Could it so when the timer is ticking that it will move the mouse over to a certain color and click the spot once? For example if it finds on the screen a "green" spot or "hue:79 ; Sat:224" that it will click the spot once?

View 1 Replies

Inheritance - Spot The With .Net Code?

Sep 12, 2010

I'm writing some code in VB.Net which I hope demonstrate to colleagues (not to say familiarise myself a little more) with various design patterns - and I'm having an issue with the FactoryMethod Pattern.

[Code]...

View 3 Replies

Copy Array At Specific Spot

Jun 5, 2011

I'm trying to copy an array starting at a specific based on the number of variables I have. I have the program give me the number of variables. What I need is to copy the original array, UnsortedArray, start at the index of var + 1. I have tried the Array.Copy and Array.CopyTo, but I get the error that my new array, UnsortedNumArray, is used before it has a value.I know I've mostly overlooked something. Could you please point me in the right direction? [code]

View 5 Replies

Making A Piece Move From One Spot To The Next?

Sep 21, 2010

TI have a picturebox on top of another picturebox, like a smaller square perfectly in the middle of a lil bigger square picturebox, if you click on the smaller one inside the slightly bigger one, it checks to see what the color is of the picturebox "under.It", or the Picturebox thats bigger than it, and is like sourounding the smaller one in the middle of it... If when you click the small one, and the BG Color of the one that's under it is Black, change it to white, "my forms bg color is also black"....so the highlighted pictureboxes will seem more like they get highlighted, ya know...

Here's the code, after you've looked at those pictures, you can probably imagine what I want this code to do, and it's really Guiness really, because when I program in VB.NET, and before I go to YouTube to teach others how to do different things with VB.NET,I like to make sure that my program is very simple, but very effective, and does the job.When I click two pictureboxes, and when my app knows that I have clicked 2 of em, which I had no problem being able to do, I want the FIRST PictureBox To Switch With The Second One That Gets Clicked, It's CHESS....It Seems So Damn SImple, BUT I'M STUCK AGAIN, AND I WANT TO MAKE A CHESS BOARD IN VB.NET.

View 6 Replies

VS 2008 Add Text In A Specific Spot

Dec 7, 2010

I have kind of a wierd situation: To start out, I have a list of strings. Then the user will give input and add list items. I have this^ part done. What I need to do now is the following: There are two buttons; button1 and button2 There is also something else that I still need to decide on (maybe a dropdown menu) I want button1.click to show openfiledialogue1, the user will pick a text file from their computer (I also need to know how to make the only file they can select text files) and then save the file's text to a string. The text will be made up of multiple lines of an unknown number.

[Code]...

View 3 Replies

Click Specific Spot In Browser Using Coordinated?

Jun 9, 2012

so i have came so far by now :

Public Class Form1
Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

[Code]....

anyways, i want to simulate a click in a specific spot of this browser ... lets say i want to click the upper part of the webpage . how will i do that ? i actually searched but i found only click given the coordinates of the desktop or things like this but nothing for giving coordinated to your program and that will click INSIDE your browser

View 3 Replies

Create In Specific Spot - Text Box In The Top Left Corner

Mar 4, 2012

I had this code

[Code]....

That creates a text box in the top left corner. Is there a way to tell were it will be made?

View 2 Replies

VS 2010 Filestream.position Lands In Wrong Spot

May 26, 2011

I am trying to read a file and note the last position in the file. The next time I look at it, I want to pick up where I left off. What I'm finding is that sometimes when it comes back to the file it is 2 characters further in than it should be. The code I am using is:

Private Sub Read_Log(ByVal skip As Boolean, ByVal recursive As Boolean)
Dim logfilestream As FileStream
Dim logreader As StreamReader

[Code]....

I'm thinking about backing up to check previous characters - but I'd rather not hack over the problem if there is an actual fix to it.

View 6 Replies

Add A String Item, Returned From Another Form To A List Box At A Specific Spot In Place Of Another?

Nov 22, 2010

there's a list-box with items, and say you want to modify an item in the middle of the list. You select that item and click "Modify" button and a new form appears with the previously selected item data from first form ready to be modified in a text-box. After modifying and clicking Ok the second form suppose to return that modified string to the first form and insert the modified string into the same spot instead of the originally selected item, so it looks like it was edited to the user.

View 2 Replies

Insert Some Html Into A String's Spot So Can Find That Text In A RichTextBox And Replace It?

Mar 14, 2012

I have this code attached to a button

If htmlText.Contains("<frame src='demo.html'/>") Then
htmlText = htmlText.Text.Replace("<frame src="demo.html/>", "<frame src='" &
OpenStory.FileName)

[code].....

View 2 Replies

Concatenating A Variable With A Regex Group Match In Regex.replace?

Apr 5, 2012

I am having an issue where I am using regex.Replace to replace part of a string. The basic idea is that I want to capture the beginning of the string then replace the end of the string with a value from code. For an example pretend I have a string that says "Test Number " followed by number and I want to increment that number. I capture the "Test Number " but when I try to concatenate that capture with the new number it treats the capture ($1) as a literal and replaces the entire string with $1[new number].

[code]...

This will output "We are on Test Number 2", as expected. how I can use a variable in the replacement string portion of the Regex.Replace when including a captured group?

View 1 Replies

Regex: Take Text & Some Special Characters Between The Xml Tags Using Regex On C#.net?

Feb 23, 2012

I want to take the text and some special characters between the xml tags.. My input file contains:

[Code]...

now i want the Regex to take text and the special characters between the tags <line>,<inline>..

View 2 Replies

Increment Regex Match Using Regex.Replace

Jun 21, 2012

I'm creating a program in VB.NET to output multiple images. Some images will have the same file name. If there is multiple files with the same name I want to add "_1_" to the end of the file name. If the "_1_" file already exists I want to increment the 1 to be "_2_". If this file already exists I want to continue incrementing the number ultil it doesn't exist. So for example "filename", filename_1_", "filename_2_", etc. Here is the code that I have tried

[Code]...

View 1 Replies

Regex Builder That Actually BUILDS RegEx From A Highlight

Nov 17, 2011

I've been working straight since yesterday trying to get this to work. I'm a noob to RegEx and I've tested out about 5 different RegEx "builders" but each of them require you to navigate through the options to build the Regex...each of them has failed when I try to use them.Is there an application out there free/paid where you select the line you want to grab and the RegEx is auto generated from that highlight rather than having to try to build the line of code? [code]

View 1 Replies

Make The Http "POST" Request To The Specific Spot?

Mar 18, 2011

I am trying to write this program that logs into this website. Now I figured out how to make the http "POST" request to the specific spot on the page which returns a "Successfully logged in" afterwards but once I make a request to another part of the page, it asks me to login (I look at the source code). I have been messing with Fiddler and I compared the a POST from my webbrowser to a POST from my program. I found the following lines to be in my browser POST and not in my program post:

[Code]...

I am assuming this has something to do with the cookie that I am suppose to get to be able to tell the website that I am logged in. If someone could point me in the right direction that would be great. I dont use XMLHTTPREQUEST in my program. I found it earlier on the msdn website but now I cant find a reference to it.I am also not good with term names and I just started learning VB and don't know much about cookies/HTTP requests and such, but that is why I am trying to learn.

View 2 Replies

VS 2010 Create An Exe "on The Spot"?

Oct 4, 2009

I'd like to know if it's possible to create an .exe file "on the spot."Meaning, somebody enters information...Say, a password field,and they enter, say, "1234".Then they click "Compile". It builds an exe file out of Visual Basic (It takes 2 files, the orm1.Designer.vb and Form1.vb that were just created with the string "Dim password as string = "1234" "), then it compiles it into an .exe.

View 6 Replies

C# - How To Use Regex

Mar 12, 2012

I am using UrlRewriter.NET for urlrewriting...how do i write the regular expression for

[URL]

in this format <rewrite url = "~/ViewProfile/([^/.]+)" to="~/ViewProfile.aspx?uid=$1" /> what should be the rewrite url for [URL]

EDIT: Rewrite code in web.config file

<configuration>
<configSections>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandle‌​r, Intelligencia.UrlRewriter" />

[code]....

View 1 Replies

How To 2 Regex As One

Sep 28, 2011

I got xml document I want to parse. Here is example:[code]I want to get list of those to textbox like item1:1 newline item2:2 newline item3:3So its just like name+id and same for next..But sofar I got only item1 newline item2 newline item3

View 6 Replies

Regex Does Not End With?

Apr 9, 2012

I've got an application which loads up some Excel files and imports them into a database.There are only certain of the sheets which I want, which are all timestamped and have either an am or pm on them. I put together a regex expression to look for that in the sheet name and skip it if it doesn't meet that criteria as:

View 6 Replies

Using Regex In Vb?

Jun 15, 2009

i would like to use the following regex in VB.net:(d+.d+)|(??????)

how would i do it? i actually need to edit a string to put it in the specified format

View 2 Replies

.net - Getting The Regex Expression?

Apr 8, 2011

i have a string similar to this one:

Hi, <<
ame>> <<surname>>, this is an example << est>>.

I what a regex that match and split this string in:

"Hi, "
<<
ame>>
" "

[code]....

I tried this one: (<<*.*?>>)|(>>*.*?<<), but doesn't work.

View 2 Replies

.net Regex Get Information?

May 31, 2010

Well I am currently trying to get the word/text in between these 2 things

[Code]...

View 1 Replies

C# - Regex To Get The Tags?

Jan 14, 2011

I have a html like this :

<h1> Headhing </h>
<font name="arial">some text</font></br>
some other text
In C#,

I want to get the out put as below. Simply content inside the font start tag and end tag

<font name="arial">some text</font>

View 3 Replies

Converting Regex From .NET To C#?

Dec 24, 2011

I hired a coder to code me something in Regex. The issue was that he coded it in Visual Basic and I need it in C#. I tried using a converter but it didnt fix the issue.

string iamtwit = ss("http://www.mailinator.com" + GetBetween(GetBetween(iamtwit1, matches.ToString(), "</a>"), "<a href=", ">"));MessageBox.Show(GetBetween(matches1.ToString(), "<a href="", Strings.Chr(34)));

Here is the original code:

Dim iamtwit As String = ss("http://www.mailinator.com" & GetBetween(GetBetween(iamtwit1, matches.ToString, "</a>"), "<a href=", ">"))

MsgBox(GetBetween(matches1.ToString, "<a href=""", Chr(34)))

The error messages I am getting are:

The name 'GetBetween' does not exist in the current context

The name 'Strings' does not exist in the current context

View 3 Replies

Getting Regex To Work?

Sep 11, 2010

I'm currently trying to get a regular expression to work and I can't seem to get it to, I've used the regex that I am using on an online tester and the text that I'm searching for is being selected alright, but I don't appear to be able to get it to work in VB.Net, so I was wondering if anyone would be willing to give me a hand.

The code I have is;
Private Sub getLink(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs)

[code].....

View 3 Replies

How To Implement A Regex

Aug 12, 2011

I would like to use regex for a txt file as follows. What I want to do is to get the whole text if CRC is other than 00000000. The content of the file below has 2 blocks of data below. And I should get the second one after the regex operation.

[Code]...

View 3 Replies

REGEX Isn't Picking Up Everything It Should?

Apr 9, 2011

I'm using REGEX to scan the following two bits of javascript and get the stream url in the javascript codes below the regex.

REGEX:

Dim matchs As MatchCollection = New Regex("(window.SC.bufferTracks.push(){1}[^)^;]*();){1}").Matches(input)
Dim match As Match
For Each match In matchs[code].....

why it's working on one javascript, but not the other? (i've tested it on several, and it works on some and not on the others

View 4 Replies







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