Search Results

Search found 2819 results on 113 pages for 'conditional expressions'.

Page 55/113 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • I need a RegEx to validate not "NONE"

    - by Justin808
    I have a text field and am looking to have if be valid for all values other than "NONE" without the quotes. I know a comparison would be easy but the system I am using only validates via RegEx expressions. What would the RegEx expression be for it?

    Read the article

  • Regex: Search and replace left side = to right side

    - by ctrlShiftBryan
    How do I use regular expressions and search and replace to turn this [UserID] = <UserID, int,> [UserID] = 123123 [UserID] = asd123123 into [UserID] = [UserID] [UserID] = [UserID] [UserID] = [UserID] In other words I want to take everything from left side of the line up to the '=' character and replace everything on the right side of the '=' with the match from the left side. We can assume a line break at the end of each line. What are my Find what: and Replace with: values?

    Read the article

  • NSPredicate and simple Regular Expression problem

    - by rjstelling
    I'm having problems with simple NSPredicates and regular expressions: NSString *mystring = @"file://questions/123456789/desc-text-here"; NSString *regex = @"file://questions+"; NSPredicate *regextest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex]; BOOL isMatch = [regextest evaluateWithObject:mystring]; In the above example isMatch is is always false/NO. What am I missing? I can't seem to find a regular expression that will match file://questions.

    Read the article

  • Regex solution for Objective-C

    - by rjstelling
    What is the best method for using Regular Expressions within Objective-C? There seems to be some open source project that provide regex support, can any one recommend one? Also I looked at NSPredicate, can anyone suggest any regex examples? Background: I want use regex mainly for validation, IP's, email addresses, internal ID's etc

    Read the article

  • How do I sanitize LaTeX input?

    - by Conley Owens
    I'd like to take user input (sometimes this will be large paragraphs) and generate a LaTeX document. I'm considering a couple of simple regular expressions that replaces all instances of "\" with "\textbackslash " and all instances of "{" or "}" with "\}" or "\{". I doubt this is sufficient. What else do I need to do? Note: In case there is a special library made for this, I'm using python.

    Read the article

  • What's a regular language?

    - by Javier Badia
    I've read that you can't parse HTML with regular expressions because HTML is not a regular language. I tried searching Wikipedia, but I didn't understand a word of what the various related articles said. Can someone explain, in simpler terms, what's a regular (or non-regular) language, and why non-regular languages can't be parsed with regexes?

    Read the article

  • Wanted: a very simple java RegExp API

    - by itsadok
    I'm tired of writing Pattern p = Pattern.compile(... Matcher m = p.matcher(str); if (m.find()) { ... Over and over again in my code. I was going to write a helper class to make it neater, but I then I wondered: is there a library that tries to provide a simpler facade for Regular Expressions in Java? I'm thinking something in the style of commons-lang and Guava.

    Read the article

  • jQuery hide ul header when all entries are deleted...

    - by Scott
    I'm a noob with jQuery...and I hope I've explained this well enough; I have a <ul> header that appears when I've added an entry to a dynamically created list using $.post. Each entry added has a delete/edit button associated with it. Header is this: <ul class="header"> <li>Month</li> <li>Year</li> <li>Cottage</li> </ul> My dynamic list that is created: <ul class="addedItems"> <li>Month</li> <li>Year</li> <li>Cottage</li> <li><span class="edit">edit</span></li> <li><span class="del">delete</span></li> </ul> This all looks like this: Month Year Cottage <--this appears after I've added an entry -------------------------------- and I want it to stick around unless all items are deleted. Dec 1990 Fir edit/delete <--entries Jan 2000 Willow edit/delete My question is: Is there some kind of conditional that I can use with jQuery to hide the class="header" if all the items are deleted? I've read up on conditional statements like is and not with jq but I'm not really understanding how they work. All of the items in class="addedItems" is stored in data produced by JSON. This is the delete function: $(".del").live("click", function(){ var del = this; var thisVal = $(del).val(); $.post("delete.php", { dirID : thisVal }, function(data){ if(confirm("Are you sure you want to DELETE this entry?") == true) { if(data.success) { //hide the class="header" here somwhere?? $(del).parents(".addedItems").hide(); } else if(data.error) { // throw error if item does not delete } } }, "json"); return false; }); //end of .del function Here is the delete.php <?php if($_POST) { $data['delID'] = $_POST['dirID']; $query = "DELETE from //tablename WHERE dirID = '{$data['delID']}' LIMIT 1"; $result = $db->query($query); if($result) { $data['success'] = true; $data['message'] = "Entry was successfully removed."; } else { $data['error'] = true; $data['message'] = "Item could not be deleted."; } echo json_encode($data); } ?>

    Read the article

  • Scala Array constructor?

    - by Lukasz Lew
    scala> val a = Array [Double] (10) a: Array[Double] = Array(10.0) scala> val a = new Array [Double] (10) a: Array[Double] = Array(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) Why these two expressions have different semantics?

    Read the article

  • How could a quine in my programming language look?

    - by ads
    I have created a turing-complete programming language (already proven) so it must be possible to write a quine for it, right? But all quines I know store their source code in a string and then replace a special character in it using something like chr and ord. My language only has the following Basic arithmetics Int and string types Variables == operator Conditional gotos I have no idea how I could write a quine as I have no real string manipulation available, I can only output constant strings. Yet, it is 100% turing-complete.

    Read the article

  • Regex for finding an unterminated string

    - by Austin Hyde
    I need to search for lines in a CSV file that end in an unterminated, double-quoted string. For example: 1,2,a,b,"dog","rabbit would match whereas 1,2,a,b,"dog","rabbit","cat bird" 1,2,a,b,"dog",rabbit would not. I have very limited experience with regular expressions, and the only thing I could think of is something like "[^"]*$ However, that matches the last quote to the end of the line. How would this be done?

    Read the article

  • Parsing incoming mail with google app engine?

    - by Ken
    We have our mail setup with google apps. We want to be able to run some regular expressions on incoming mail and process this information. Is this possible today with Google App Engine? Does google provide some kind of infrastructure that can do this?

    Read the article

  • php if array key exists inside multidimentional array

    - by Richard
    how can i check if logo exists in this array called $attachements print_r is below: Array ( [logo] = /home/richar2/public_html/ioagh/images/stories/jreviews/20100510115659_1_img.gif ) when theres no logo, the array print_r's Array ( ) i tried: if (isset($attachments['logo']) ) {..} but the conditional code runs when there is no logo

    Read the article

  • Built-in precedence in Expression Trees for math?

    - by jdk
    I'm unable to find the .NET FCL built-in concept of precedence to leverage while constructing Expression Trees. Ref System.Linq.Expressions Namespace. Is this something that must be handled manually in code, or is it somehow implicit and I'm not recognizing it (e.g. maybe through helper methods or classes)? I want to apply it to math operations to ensure 3 + 5 * 10 results in 53 instead of 80.

    Read the article

  • Get address bar without paramentrs.

    - by kalininew
    Help me please get the value of the address bar of browser without the parameters passed. Without the use of regular expressions and string functions. You can do this? (I use php on apache). enter http://dev.mazda-parts.ru/catalogue/?spattern=1 exit http://dev.mazda-parts.ru/catalogue/

    Read the article

  • Using .inc files when theming.

    - by Nick Lowman
    Hi there, I noticed in the Zen theme there were various PHP files with the .inc file extension .i.e. template.conditional-styles.inc. I've read/watched quite a few theming tutorials but none of them mentioned these files for theming, only the template.php. Can anyone tell me when, if and how I should be using these files for theming. Many thanks

    Read the article

  • How can I tell if a set of parens in perl code will act as grouping parens or form a list?

    - by Ryan Thompson
    In perl, parentheses are used for overriding precedence (as in most programming languages) as well as for creating lists. How can I tell if a particular pair of parens will be treated as a grouping construct or a one-element list? For example, I'm pretty sure this is a scalar and not a one-element list: (1 + 1) But what about more complex expressions? Is there an easy way to tell?

    Read the article

  • Can I have a macro run whenever I save a file in Visual Studio 2005?

    - by Mark
    When I save a file in Visual Studio 2005, I'd like to have a macro also run that updates a copyright (through a regular expression search and replace). I'm not new to regular expressions, but I am new to VB/VBA and Visual Studio macros, so what I need help with specifically is: getting a macro to run upon save, preferably after I press CTRL-S but before it actually writes the file so that the results of the search and replace are actually saved without having to save twice calling search and replace for a regular expression from inside the VB/VBA macro Thanks, Mark

    Read the article

  • RegExp: want to find all links that do not end in ".html"

    - by grovel
    Hi, I'm a relative novice to regular expressions (although I've used them many times successfully). I want to find all links in a document that do not end in ".html" The regular expression I came up with is: href=\"([^"]*)(?<!html)\" In Notepad++, my editor, href=\"([^"]*)\" finds all the links (both those that end in "html" and those that do not). Why doesn't negative lookbehind work? I've also tried lookahead: href=\"[^"]*(?!html\") but that didn't work either. Can anybody help? Cheers, grovel

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >