Search Results

Search found 4498 results on 180 pages for 'expression'.

Page 18/180 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Regular expression help parsing SQLIO output

    - by jaspernygaard
    Hi I've been working on a regular expression to parse the output of a series of SQLIO runs. I've gotten pretty far, but not quite there yet. I'm seeking a 100% regex solution and no pre-manipulation of the input. Could anyone assist with a little guidance with the following regular expression: .*v(?<SQLIOVersion>\d\.\d).*\n.*\n(?<threads>\d*)\s.*for\s(?<Seconds>\d+).*\n.*using\s(?<clustersize>[0-9]*)KB.*\n.*\n.*size:\s(?<currentfilesize>\d+).*\n.*\n.*\n.*\n.*\s(?<IOs>\d*\.\d*).*\n.*\s(?<MBs>\d*\.\d*).*\n.*\n.*\s(?<MinLatency_ms>\d+).*\n.*\s(?<AvgLatency_ms>\d+).*\n.*\s(?<MaxLatency_ms>\d+).*\n.*\n.*\n\%\:..(?<ms>\d*\s+)* Here's a snippet of the output - note the headers, which change during the SQLIO batch run: File

    Read the article

  • PHP & Regular expression: keyword just occurs once

    - by lauthiamkok
    Hi, how can I make sure a certain keyword just occurs once in the input with regular expression? I think there is some mistakes in the expression below as I can repeat the same keywords, if (!preg_match('/\b(.php?){1}\b/', $cfg_path)) { $error = true; echo '<error elementid="cfg_path" message="PATH - make sure you have a \'.php?\' in the path."/>'; } I just want this to be true, form.php?category=something or form.php? but not this, form.php?.php?category=something or form.php?.php? please let me know how to fix it. thanks.

    Read the article

  • AutoMapper and Linq expression.

    - by Raffaeu
    I am exposing the Dto generated from AutoMapper to my WCF services. I would like to offer something like that from WCF: IList GetPersonByQuery(Expression predicate); Unfortunately I need back an expression tree of Person as my DAL doesn't know the DTO. I am trying this wihtout success: var func = new Func<Person, bool>(x => x.FirstName.Contains("John")); var funcDto = Mapper.Map<Func<Person, bool>, Func<PersonDto, bool>>(func); Console.WriteLine(func.ToString()); Console.WriteLine(funcDto.ToString()); THe error that I get is: ----> System.ArgumentException : Type 'System.Func`2[TestAutoMapper.PersonDto,System.Boolean]' does not have a default constructor Do you have any suggestions?

    Read the article

  • Oracle - Determine maximum supported size for regular expression

    - by FrustratedWithFormsDesigner
    I have a regular expression that throws ORA-12733, "regular expression is too long". How do I determine what the maximum supported size is? FYI: the offending regex is 892 characters. It's a generated regex, so I could change how I generate and execute it, but I would like to know what the limits to the max size are before I change how I am generating and executing. (running Oracle 10.2g) UPDATE: If it depends on the actual regex, here's the begining of it (the rest is just the same thing repeated, with different values between ^ and $): (^R_1A$|^R_2A$|^R_3A$|^R_4A$|^R_4B$|^R_5A$|^R_5B$...

    Read the article

  • Notepad++ find string with a new-line and replace

    - by Giraldi Maggio
    [Notepad++ Question] How do I use find-and-replace to replace the attribute of a series of tags using expression? Case scenario: Let's say I have a couple of lines of something like this: <li><a title="Bla bla" href= "http://www.url.com/etc">Text</a></li> And I want to replace them with this: <li><a title="Bla bla" href="">Text</a></li> Note the new line and double tabs on the original.

    Read the article

  • Regular Expression to isolate an html tag

    - by orit cohen
    I'm looking for a regular expression to isolate an html tag. This includes the TAG the ATTRIBUTES and the CONTNET inside. Let's say I have this: <html> <body> aajsdfkjaskd <TAGNAME name="bla" context="non">hfdfhdj </TAGNAME> </body> </html> I need a regular expression that would return: <TAGNAME name="bla" context="non">hfdfhdj </TAGNAME> Thank, Joe

    Read the article

  • Finding Line Beginning using Regular expression in Notepad++

    - by Michel Merlin
    Finding Line Beginning using Regular expression in Notepad++ (Sorry if this is a newbie question) I want to strip a 4000-line HTML file from all the jQuery "done" stuff, e.g.: <DIV class=menu done27="1" done26="0" done9="1" done8="0" done7="1" done6="0" done4="20"> should be replaced with: <DIV class=menu> In http://www.zytrax.com/tech/web/regex.htm#experiment I can do it with RE: [ ^]done[0-9]+="[0-9]+" but in Notepad++ 5.6.8 UNICODE, in a .HTM file encoded in ANSI, Search Find, Search mode = Regular expression, putting this RE in the "Find what" field won't work (it will only find the 5 occurrences starting with a space, it will miss the 2 occurrences starting at the beginning of a line; IOW, the caret for line beginning, or the alternating it with a space, fails). How do I? TIA, Versailles, Wed 21 Apr 2010 10:42:20 +0200

    Read the article

  • Finding Line Beginning using Regular expression in Notepad++

    - by Michel Merlin
    Finding Line Beginning using Regular expression in Notepad++ (Sorry for this newbie question) I want to strip a 4000-line HTML file from all the jQuery "done" stuff, e.g.: <DIV class=menu done27="1" done26="0" done9="1" done8="0" done7="1" done6="0" done4="20"> should be replaced with: <DIV class=menu> In http://www.zytrax.com/tech/web/regex.htm#experiment I can do it with RE: [ ^]done[0-9]+="[0-9]+" but in Notepad++ 5.6.8 UNICODE Search Find, Search mode = Regular expression, putting this RE in the "Find what" field won't work (it will only find the 5 occurrences starting with a space, it will miss the 2 occurrences starting at the beginning of a line; IOW, the caret for line beginning, or the alternating it with a space, fails). How do I? TIA, Versailles, Wed 21 Apr 2010 10:18:20 +0200

    Read the article

  • Regex expression with leading zero

    - by user1874087
    I'm rather new to regex expressions and need help with a simple expression. I'm using Pentaho for ETL (Replace in String transformation) and I have column values that I need to add leading zeros to and parse out text as part of the database import. So far I have been unable to add the leading zero. The column is called Region and the values are "region 8", "region 10", "region 11". My regex expression is ['Region'] which will eliminate the region text but produces results = "8", "10", "11". I need values to produce "08", "10", "11". So all the single digit numbers must have leading zeros.

    Read the article

  • Javascript Regular Expression help

    - by user270399
    Hello! I have got the following regular expression working just fine in Rad Software Regular Expression designer. param\s+name\s*=\s*"movie"\s+value=\s*"(?<target>.*?)" And now i am wondering, how to get this to work in javascript. It keeps on complaininge about the "target" part. I am trying to validate and get the url from the youtube embed code. <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/ueZP6ifzqMY&hl=sv_SE&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ueZP6ifzqMY&hl=sv_SE&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object> How the heck do i get this regex to work with my javascript? :)

    Read the article

  • PHP: Regular Expression to get a URL from a string

    - by Matthew Iselin
    I'm working on some PHP code which takes input from various sources and needs to find the URLs and save them somewhere. The kind of input that needs to be handled is as follows: http://www.youtube.com/watch?v=IY2j_GPIqRA Try google: http://google.com! (note exclamation mark is not part of the URL) Is http://somesite.com/ down for anyone else? Output: http://www.youtube.com/watch?v=IY2j_GPIqRA http://google.com http://somesite.com/ I've already borrowed one regular expression from the internet which works, but unfortunately wipes the query string out - not good! Any help putting together a regular expression, or perhaps another solution to this problem, would be appreciated.

    Read the article

  • Examining a lambda expression at runtime in C#

    - by Ben Aston
    I have a method Get on a type MyType1 accepting a Func<MyType2, bool> as a parameter. An example of its use: mytype1Instance.Get(x => x.Guid == guid)); I would like create a stub implementation of the method Get that examines the incoming lambda expression and determines what the value of guid is. Clearly the lambda could be "anything", but I'm happy for the stub to make an assumption about the lambda, that it is trying to match on the Guid property. How can I do this? I suspect it involves the use of the built-in Expression type?

    Read the article

  • AIR SQLite IN expression not working

    - by goseta
    Hi, I'm having a problem with an expression in my sql statement in SQLite for Adobe AIR basically I have this sql = "UPDATE uniforms SET status=@status WHERE customerId IN(19,20)"; updateStmt.parameters["@status"] = args[1]; updateStmt.execute(); if I run the above code it works, updating the status when the id are 19 and 20 but if I pass the ids list as a parameter like this sql = "UPDATE uniforms SET status=@status WHERE customerId IN(@ids)"; updateStmt.parameters["@status"] = args[1]; updateStmt.parameters["@ids"] = "19,20"; updateStmt.execute(); it gives me and error, saying could not convert text value to numeric value, which make sense because I'm passing and string but the IN expression should convert it accordingly, like it does when I pass directly the list values, why is not working the other way, thanks for any help!

    Read the article

  • Erroneous Matches with Regular Expression

    - by Ballsacian1
    $regexp = '/(?:<input\stype="hidden"\sname="){1}([a-zA-Z0-9]*)(?:"\svalue="1"\s\/>)/'; $response = '<input type="hidden" name="7d37dddd0eb2c85b8d394ef36b35f54f" value="1" />'; preg_match($regexp, $response, $matches); echo $matches[1]; // Outputs: 7d37dddd0eb2c85b8d394ef36b35f54f So I'm using this regular expression to search for an authentication token on a webpage implementing Joomla in order to preform a scripted login. I've got all this working but am wondering what is wrong with my regular expression as it always returns 2 items. Array ( [0] => [1] => 7d37dddd0eb2c85b8d394ef36b35f54f) Also the name of the input I'm checking for changes every page load both in length and name.

    Read the article

  • Regular Expression for accurate word-count using JavaScript

    - by Haidon
    I'm trying to put together a regular expression for a JavaScript command that accurately counts the number of words in a textarea. One solution I had found is as follows: document.querySelector("#wordcount").innerHTML = document.querySelector("#editor").value.split(/\b\w+\b/).length -1; But this doesn't count any non-Latin characters (eg: Cyrillic, Hangul, etc); it skips over them completely. Another one I put together: document.querySelector("#wordcount").innerHTML = document.querySelector("#editor").value.split(/\s+/g).length -1; But this doesn't count accurately unless the document ends in a space character. If a space character is appended to the value being counted it counts 1 word even with an empty document. Furthermore, if the document begins with a space character an extraneous word is counted. Is there a regular expression I can put into this command that counts the words accurately, regardless of input method?

    Read the article

  • Regular expression for a string containing one word but not another

    - by Chris Stahl
    I'm setting up some goals in Google Analytics and could use a little regex help. Lets say I have 4 URLs http://www.anydotcom.com/test/search.cfm?metric=blah&selector=size&value=1 http://www.anydotcom.com/test/search.cfm?metric=blah2&selector=style&value=1 http://www.anydotcom.com/test/search.cfm?metric=blah3&selector=size&value=1 http://www.anydotcom.com/test/details.cfm?metric=blah&selector=size&value=1 I want to create an expression that will identify any URL that contains the string selector=size but does NOT contain details.cfm I know that to find a string that does NOT contain another string I can use this expression: (^((?!details.cfm).)*$) But, I'm not sure how to add in the selector=size portion. Any help would be greatly appreciated!

    Read the article

  • Qt/C++ regular expression library with unicode property support

    - by Dave
    I'm converting an application from the .Net framework to Qt using C++. The application makes extensive use of regular expression unicode properties, i.e. \p{L}, \p{M}, etc. I've just discovered that the QRegExp class lacks support for this among other things (lookbehinds, etc.) Can anyone recommend a C++ regular expression library that: Supports unicode properties Is unicode-aware in other respects (i.e. \w matches more than ASCII word characters) As a bonus, supports lookbehinds. Please don't point me to the wikipedia article; I don't trust it. That article says that QRegExp supports unicode properties. Unless I'm really doing something wrong, it doesn't. I'm looking for someone actually using unicode properties with a regex library in a project.

    Read the article

  • Generate a Constant expression from a function

    - by Lee
    For my Google Wave robot, on the onDocumentChanged event I want to apply a filter as follows: @Capability(filter = FILTER) @Override public void onDocumentChanged(DocumentChangedEvent event) { ... } I want the filter to be generated the first time the robot is run, which I'm trying to do as follows: private static final String FILTER = generateFilter(); private static final String generateFilter(){ ... } However, it complains FILTER isn't a constant expression when used within @Capability. generateFilter() will return the same string every time it is called, I'm only using it to create the string so that when I make changes, I don't need to worry about updating the filter. Now I could be going about this all wrong, so wondered if anyone knew what I'm doing wrong, or knew a better way in which I could generate a constant expression from the function.

    Read the article

  • Regular Expression

    - by equilibrium
    Ohh! this regular expression thing is eating my brain up. I have been reading it from Introduction to Automata Theory, Languages and Computer by Hopcroft, Motwani and Ullman. I have solved a few exercises too but could not solve the following even after trying for almost one hr. The problem is to write a regular expression that defines a language consisting of all strings of 0s and 1s except the substring 011. Is the answer (0+1)* - 011 correct ? If not what should be the correct answer for this?

    Read the article

  • Regular expression one or more times JAVA

    - by user1381564
    Hi i am trying to match a string against a pattern this is the possible string signal CS, NS, dl: stateType := writeOrRead0; signal CS, pS : stateType := writeOrRead0; signal dS : stateType := writeOrRead0; i am only concerned with the pattern as far as the first colon. but the number of signals define can be more than one it could be three or four even this is the regular expression i have ^signal\\s*(\\w+),*\\s*(\\w+)\\s*: it will pick up the second two signal but and for the second one it picks up CS and pS and but the d and S in the next signal when i use matcher.group() come up seperately Can anyone give me an expression that will pick up all signal names whether there is one two three or more?

    Read the article

  • Why does a non-constant offsetof expression work?

    - by Chris J. Kiick
    Why does this work: #include <sys/types.h> #include <stdio.h> #include <stddef.h> typedef struct x { int a; int b[128]; } x_t; int function(int i) { size_t a; a = offsetof(x_t, b[i]); return a; } int main(int argc, char **argv) { printf("%d\n", function(atoi(argv[1]))); } If I remember the definition of offsetof correctly, it's a compile time construct. Using 'i' as the array index results in a non-constant expression. I don't understand how the compiler can evaluate the expression at compile time. Why isn't this flagged as an error?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >