Using Perl Regex Constructs?

Jul 24, 2010

In perl you can write $string =~ tr/[a,e,i,o,u,y]/[A,E,I,O,U,Y]/; for example. Is it possible to achieve the same "translation" effects with VB.Net regexes? PS: I'm not searching for a way to port this very example, it's more of a curiosity question :)

View 2 Replies


ADVERTISEMENT

Start Out By Writing The Constructs?

Nov 17, 2009

I want to create my own language for my software, I want to make the language simple, and I want to create my own syntax for this language.So currently in my software, I have a code editor, the code in the editor will be saved, and when the program that the user is making in my software runs I want to read in the users code, and do something with it (depending on what he/she wrote).

I want to start out by writing the constructs (if/else/elseif, while, for, foreach, etc.). Next I want to add some basic functions (add, subtract, messagebox, etc.).What process would I have to take to get started, and how would/does something like this work with vb.net?

View 1 Replies

Call Perl EXE From .net?

Aug 10, 2009

I want to call perl EXE to process something within .NET and i need to get some results from the perl exe.

For example i am going to pass two array to perl exe and i need to return a array form perl.

View 1 Replies

Calling Perl From VB?

Apr 19, 2010

I have created a GUI for controlling a device in VB.The VB GUI has a bunch of intelligence behind each button push to determine exactly what command need to be executed. he commands are then written to a perl file (the communication to theoard is in a perl package), and the script is executed. This works consistently for us, but has severe performance issues.he issue I have is that the underlying perl package can take up to 30 seconds to read into the perl interpreter.

View 1 Replies

Convert From Perl

Mar 25, 2011

does anyone know a good tool - convert perl script to vb.net?

View 1 Replies

Run Perl Script And Detect When It's Done?

Jul 16, 2010

I'm need to run a perl script from my application and detect when it's done. I plan to check if it's done with a timer so I hear I need to use WaitForSingleObject to detect it's finished

Secondly, this might be the wrong place but I'm asking anyway, I want to send the perl's output to a file so I can read it in when it's done but that part of it isn't working correctly, the exact same string typed into a cmd.exe window works correctly but the shell command still sends the output to the dos window and doesn't generate the file.

NOTE: This is just a test program, it's not how I'm going to do it in the real app.

Imports System.Runtime.InteropServices
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code].....

View 9 Replies

Call A Perl Script From VB With Parameters

Oct 5, 2011

I'm using Visual Studio 08 and Vb.Net (3.5). I want to call a perl script. This perl script should get two values (that the user wrote into input-elements in the vb.net application). Then the perl script should return one or more strings (maybe a list or an array?). How can I do this?

View 1 Replies

Call A Perl Script With Parameters?

Feb 1, 2009

Call a perl script from vb.net with parameters

View 2 Replies

Java - Perl Script In Background?

May 26, 2010

I have a perl script i made to automatically telnet into different servers . but its interface is only command line. To make it more user friendly for general windows users , i need to make GUI for it . My idea is to make GUI in a language like VB,java ,etc and let that call perl script . my script will run in background in a command prompt and whatever the result it displays back in GUI.

Got some success. GUI in vb ,I run an instance of CMD in background ,run perl script in that .But that is wer program fails .As perl script runs in a thread for perl , i only get the output when script completes(rather say when it timeout). i need a mechanism where i can interact with the perl script , take output of script and show to user , then take input from user and so on .

View 2 Replies

Perl - Convert Code - 2010 ?

Oct 6, 2011

I am not familiar at all with perl but I am trying to convert some code over to vb.net (2010).

The bit I am stuck with is the following:

CODE:

A bit of code that uses the above data is:

CODE:

From my understanding they are something like structures or arrays in VB, would this be right?

If I am reading the code right than this:

CODE:

should equal to a two bye array of: "0x10, 0x01" - am I far off?

Would something like what I have below work? It seems a bit messy, there must be a better way to do it:

CODE:

View 1 Replies

Simple Text Processing Task In Perl

Feb 25, 2012

I have a long string containing a bibliography, alternating between lines of paper-title/comma-separated-author-list, like the following:

Learning Programs: A Bayesian Approach
-P. Liang, M. Jordan, D. Klein
-Variational methods for a Dirichelet process
-D. Blei, M. Jordan

What I want is a list of unique authors (alphabetized by last name) and counts. In the above example it would be:

D. Blei (1)
M. Jordan (2)
D. Klein (1)
P. Liang (1)

View 2 Replies

Lock / Prevent The User From Opening The Perl File / Code

Dec 15, 2011

i want to create an exe in vb.net by packaging few perl files along with it. when i am packaging those files i am able to hide those files by making the hide option true. but if the 'show hidden files' is selected those files will be visible. I want to lock/prevent the user from opening the perl file/code. want to know if there is any way to do it.

View 1 Replies

Write Code To Compile And Execute C,c++,c#,java,perl And Python Programs?

Jun 13, 2009

I'm trying to make a vb.net application that has got 2 textboxes, 7 radio buttons and 2 buttons(one named compile and the other 'run'). How can I load the content of a C/C++(or any programming language) file into the 1st textbox and on clicking the compile button, i should be able to show the errors or the C/C++ program in the 2nd textbox. On clicking Run, I should be able to show the output in the 2nd textbox. In short, I want to use the 2nd textbox as a terminal/console. The radio buttons are 4 selecting the language C or C++ or python or C# or java or perl or vb.R d compilers of all these languages present in .net?

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

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

RegEx To Get A String Between?

Aug 11, 2010

How can i get the String Between this I tried everything but I just cant make it:

This is the String:

Quote:

<a title="I Need this String" href="/page/view_7894135/I_Need_This_String.html" class="tinylink">I Need this String</a>

This was my RegEx but it doesent work. I tried everything:

(?<=title="">).+(?="")

View 5 Replies

String Contains ZXC Regex?

Jun 8, 2012

the string ordering does not matter Z, X, or c can be any order in the string but the regex must fail if all three are not present. I can easily do Three different regex but was wonder can this be done with one expression?

View 12 Replies







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