Search Results

Search found 10383 results on 416 pages for 'exact match'.

Page 5/416 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Forcing exact hostname match in IIS

    - by iis_newbie
    I am looking how to force an exact hostname match within IIS when using https. For instance, I want "https://works.mysite.com/resource" to be ok, but "https://noworks.mysite.com/resource" to return 404 (assuming they both resolve to the same IP). IIUC, the default behavior of IIS when going to "https://noworks.mysite.com/resource" is to get a cert warning, if the user presses continue, the user is able to access the URL. I was able to do this by generating a *.mysite.com SSL cert, and then specify the hostname within the bindings in IIS, but without the * in the beginning, the hostname field is disabled and blank. Am I missing something simple here?

    Read the article

  • Open file without specifying exact location

    - by person
    Say I have a file in some obscure directory that I want to open and edit. I don't want to do something like this... vim ~/foo/bar/blah/doh/ugh.txt I'd rather be able to say find this file and open it. I know there are commands like locate and find to find a file or directory, but I'm not sure whether these can (or even should) be utilized in what I'm trying to do. Basically, what is the simplest way to open a file with a program w/o specifying its exact location? (In cases where there isn't another file with the same name in the entire system, and cases where there are multiple).

    Read the article

  • Wget a directory with exact filenames?

    - by kaspr
    The following works because I inserted the exact filename: wget --referer=http://www.*****.com --cookies=on --load-cookies=cookie.txt --keep-session-cookies --save-cookies=cookie.txt http://www.*****.com/doc/GG-15252252.html But if I just do it with the doc dir I will get a 403 error message: Connecting to www.*****.com|***.**.***.**|:**... connected. HTTP request sent, awaiting response... 403 Forbidden 2010-11-04 21:25:38 ERROR 403: Forbidden. So I can't list the dir, what can I do? Please help anybody and thanks :)!!

    Read the article

  • Excel Match Bug in a sparse range with duplicate keys

    - by DangerMouse
    Data in TheRange is {1,"",1,"",1,"",1,"",2} =Match(2, TheRange, 1) returns 9 as expected =Match(1.5, TheRange, 1) returns 7 as expected =Match(1, TheRange, 1) returns 5 which is not expected Anyone come across this ? Anyone got a fix? Additionally if I use Worksheet.Function.Match in VBA I get more unexpected results.

    Read the article

  • How to match filetype with regular expression?

    - by Sanarothe
    Hi. I'm stuck trying to get a regex to match a filetype in a sorting script. Dir.foreach(savedirs[0]) do |x| puts "Matching " + x + " against filetypes." case x when x.match(/^.*\.exe$/i) then puts x when x.match(/\.jpe?g$/) then FileUtils.move(x, sortpath[".exe"], :verbose => true) when x =~ /\.jpg$/ then FileUtils.move(x, sortpath[".jpg"]) end end I can't get any of these to match on in windows. All I need is to confirm that a given filename matches against compatible filetypes.

    Read the article

  • Regex to match with digit in the string.

    - by Harikrishna
    I will have a different type of string(string will not have fixed format,they will be different every time) from them I want to remove some specific substring.Like the string can be OPTIDX 26FEB2009 NIFTY CE 2500 OPTIDX NIFTY 30 Jul 2009 4600.00 PE OPTSTK ICICIBANK 30 Jul 2009 700.00 PA I want to extract Rs.(digit) from those string and store it into one variable and then in those string there should not be Rs.(digit). What should be the regex for that ? EDIT private string ExtractingRupeesFromString(String str) { Match match = Regex.Match(cellRecord, @"(\d+(?:\.\d+)?)\D*$"); return match.Value.ToString(); }

    Read the article

  • Regular Expression - Match only 7 chars?

    - by Simon
    I'm trying to match a SEDOL (exactly 7 chars: 6 alpha-numeric chars followed by 1 numeric char) My regex ([A-Z 0-9]{6})[0-9]{1} matches correctly but strings greater than 7 chars that begin with a valid match also match (if you see what I mean :)). For example: B3KMJP4 matches correctly but so does: B3KMJP4x which shouldn't match. Can anyone show me how to avoid this?

    Read the article

  • Regular Expression :match string containing only non repeating words

    - by nash
    I have this situation(Java code): 1) a string such as : "A wild adventure" should match. 2) a string with adjacent repeated words: "A wild wild adventure" shouldn't match. With this regular expression: .* \b(\w+)\b\s*\1\b.* i can match strings containing adjacent repeated words. How to reverse the situation i.e how to match strings which do not contain adjacent repeat words

    Read the article

  • Way to partialy match a Ruby string using Regexp

    - by Fabiano PS
    I'm working on 2 cases: assume I have those var: a = "hello" b = "hello-SP" b = "not_hello" 1 - Any partial matches I want to accept any string that has the var a inside, so b and c would match. 2 - Patterned match I want to match a string that has a inside, followed by '-', so b would match, c does not. I am having problem, because I always used the syntax /expression/ to define Regexp, so how dinamicaly define an RegExp on Ruby??

    Read the article

  • Do not match if word appears in regex

    - by David542
    I have a url, and I want it to NOT match if the word 'season' is contained in the url. Here are two examples: CONTAINS SEASON, DO NOT MATCH 'http://imdb.com/title/tt0285331/episodes?this=1&season=7&ref_=tt_eps_sn_7' DOES NOT CONTAIN SEASON, MATCH 'http://imdb.com/title/tt0285331/ Here is what I have so far, but I'm afraid the .+ will match everything until the end. What would be the correct regex to use here? r'http://imdb.com/title/tt(\d)+/.+^[season].+'

    Read the article

  • Program for remove exact duplicate files while caching search results

    - by John Thomas
    We need a Windows 7 program to remove/check the duplicates but our situation is somewhat different than the standard one for which there are enough programs. We have a fairly large static archive (collection) of photos spread on several disks. Let's call them Disk A..M. We have also some disks (let's call them Disk 1..9) which contain some duplicates which are to be found on disks A..M. We want to add to our collection new disks (N, O, P... aso.) which will contain the photos from disks 1..9 but, of course, we don't want to have any photos two (or more) times. Of course, theoretically, the task can be solved with a regular file duplicate remover but the time needed will be very big. Ideally, AFAIS now, the real solution would be a program which will scan the disks A..M, store the file sizes/hashes of the photos in an indexed database/file(s) and will check the new disks (1..9) against this database. However I have hard time to find such a program (if exists). Other things to note: we consider that the Disks A..M (the collection) doesn't have any duplicates on them the file names might be changed we aren't interested in approximated (fuzzy) comparison which can be found in some photo comparing programs. We hunt for exact duplicate files. we aren't afraid of command line. :-) we need to work on Win7/XP we prefer (of course) to be freeware TIA for any suggestions, John Th.

    Read the article

  • dansguardian error: filterports must match number of filterips (pfsense)

    - by Bulki
    Hi I'm setting up pfsense with squid3 and dansguardian packages. When I try to start the dansguardian service however, I get the following errors: May 27 22:17:37 php: /pkg_edit.php: The command '/usr/local/etc/rc.d/dansguardian.sh start' returned exit code '1', the output was 'kern.ipc.somaxconn: 16384 -> 16384 kern.maxfiles: 131072 -> 131072 kern.maxfilesperproc: 104856 -> 104856 kern.threads.max_threads_per_proc: 4096 -> 4096 Starting dansguardian. filterports (2) must match number of filterips (1) Error parsing the dansguardian.conf file or other DansGuardian configuration files /usr/local/etc/rc.d/dansguardian.sh: WARNING: failed to start dansguardian' May 27 22:17:37 root: /usr/local/etc/rc.d/dansguardian.sh: WARNING: failed to start dansguardian May 27 22:17:37 dansguardian[52944]: Error parsing the dansguardian.conf file or other DansGuardian configuration files May 27 22:17:37 dansguardian[52944]: filterports must match number of filterips What does "filterports must match number of filterips" mean? Any thoughts on the matter?

    Read the article

  • match and export subject line and from header with procmail

    - by Nick
    I would like to use procmail or a combination of procmail and formail to take an email message and match a specific keyword in the Subject: line/header, and if matched, export the contents of the Subject: line/header, and the contents of the From: line/header to a perl script. I have researched this, and have not been able to get this working all the way. I am new to procmail, and I assume I need to use a nesting block, but I am not sure how to get the data and then export it. I have been able to match the subject line and export it to a perl script where it is read via ARGV0, but get lost when trying to export and match multiple fields. I tried subscribing to the procmail listserv, but it appears to be broken. Can someone help me with this, please?

    Read the article

  • using sed to print next line after match

    - by smokinguns
    I came across various examples on printing next line after a match, that use awk and sed. I'm using it in my code and it works fine. Now I want to use a variable instead of a hardcoded value for the pattern match. The search pattern string includes forward slashes "/". How do I use a variable that has "/" in it and use it to print the next line after the match? The following doesn't seem to work: var="/somePath/to/my/home" val=`echo -e "$someStr" | sed -n ':$var:{n;p;}'` In this case, val is always blank. I'm using using ":" as the delimiter instead of "/". I'm on a Mac OS X.

    Read the article

  • Nginx RegEx to match a directory and file

    - by HTF
    I'm wondering if it's possible to match Wordpress directory and specific file in the same location, so at the moment I've got rule to match only the wp-admin directory: ## Restricted Access directory location ^~ /wp-admin/ { auth_basic "Access Denied!"; auth_basic_user_file .users; location ~ \.php$ { fastcgi_pass unix:/var/run/php-fpm/www.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } I would like to also match the wp-login.php file but I can't get to work, I've tried the following: location ^~ /(wp-admin/|wp-login.php) { ...

    Read the article

  • Record Matching Software to Compare two tables and match on % Based

    - by Crazyd
    So I have some table with Name, Address, and Zip with no record data attached; and I have a table which has all the same, but has more information and I need a way to merge the tables when they don't match 100%. How do I match them up if they aren't Identical? I'm a newb @ SQL, but I know they won't match up for the most part and I can't be the only one with this issue. However software which will do this has proven to be difficult. Writing software to do this would even be worse than having to do it in the first place. I know I can do this in excel; kinda, but with the amount of records I have its proving to be difficult over a million.

    Read the article

  • Python: list and string matching

    - by pete
    Hi All, I have following: temp = "aaaab123xyz@+" lists = ["abc", "123.35", "xyz", "AND+"] for list in lists if re.match(list, temp, re.I): print "The %s is within %s." % (list,temp) The re.match is only match the beginning of the string, How to I match substring in between too.

    Read the article

  • Match multiline regex in file object

    - by williamx
    How can I extract the groups from this regex from a file object (data.txt)? import numpy as np import re import os ifile = open("data.txt",'r') # Regex pattern pattern = re.compile(r""" ^Time:(\d{2}:\d{2}:\d{2}) # Time: 12:34:56 at beginning of line \r{2} # Two carriage return \D+ # 1 or more non-digits storeU=(\d+\.\d+) \s uIx=(\d+) \s storeI=(-?\d+.\d+) \s iIx=(\d+) \s avgCI=(-?\d+.\d+) """, re.VERBOSE | re.MULTILINE) time = []; for line in ifile: match = re.search(pattern, line) if match: time.append(match.group(1)) The problem in the last part of the code, is that I iterate line by line, which obviously doesn't work with multiline regex. I have tried to use pattern.finditer(ifile) like this: for match in pattern.finditer(ifile): print match ... just to see if it works, but the finditer method requires a string or buffer. I have also tried this method, but can't get it to work matches = [m.groups() for m in pattern.finditer(ifile)] Any idea?

    Read the article

  • Determining whether values can potentially match a regular expression, given more input

    - by Andreas Grech
    I am currently writing an application in JavaScript where I'm matching input to regular expressions, but I also need to find a way how to match strings to parts of the regular expressions. For example: var invalid = "x", potentially = "g", valid = "ggg", gReg = /^ggg$/; gReg.test(invalid); //returns false (correct) gReg.test(valid); //returns true (correct) Now I need to find a way to somehow determine that the value of the potentially variable doesn't exactly match the /^ggg$/ expression, BUT with more input, it potentially can! So for example in this case, the potentially variable is g, but if two more g's are appended to it, it will match the regular expression /^ggg$/ But in the case of invalid, it can never match the /^ggg$/ expression, no matter how many characters you append to it. So how can I determine if a string has or doesn't have potential to match a particular regular expression?

    Read the article

  • How to perform a literal match with regex using wildcard

    - by kashif4u
    I am trying to perform literal match with regular expression using wildcard. string utterance = "Show me customer id 19"; string pattern 1 = "*tom*"; string patter 2 = "*customer id [0-9]*"; Desired results: if (Regex.IsMatch(utterance, pattern 1 )) { MATCH NOT FOUND } if (Regex.IsMatch(utterance, pattern 2 )) { MATCH FOUND } I have tried looking for literal match solution/syntax in wildcard but having difficulty. Could you also enlighten me with with an example on possible Pattern Matching Strength algorithm i.e. if code match 90 select? Note: I have table with 100000 records to perform literal matches from user utterances. Thanks in advance.

    Read the article

  • match at the beginning of any line, including the first

    - by JoelFan
    According the the Perl documentation on regexes: By default, the "^" character is guaranteed to match only the beginning of the string ... Embedded newlines will not be matched by "^" ... You may, however, wish to treat a string as a multi-line buffer, such that the "^" will match after any newline within the string ... you can do this by using the /m modifier on the pattern match operator. The "after any newline" part means that it will only match at the beginning of the 2nd and subsequent lines. What if I want to match at the beginning of any line (1st, 2nd, etc.)?

    Read the article

  • Need Regex for to match special situations

    - by Daniel
    I'm desperately searching for regular expressions that match these scenarios: 1) Match alternating chars I've a string like "This is my foobababababaf string" - and I want to match "babababa" Only thing I know is the length of the fragment to search - I don't know what chars/digits that might be - but they are alternating. I've really no clue where to start :( 2) Match combined groups In a string like "This is my foobaafoobaaaooo string" - and I want to match "aaaooo". Like in 1) I don't know what chars/digits that might be. I only know that they will appear in two groups. I experimented using (.)\1\1\1(.)\1\1\1 and things like this...

    Read the article

  • Problem to match font size to the screen resolution in libgdx

    - by Iñaki Bedoya
    I'm having problems to show text on my game at same size on different screens, and I did a simple test. This test consists to show a text fitting at the screen, I want the text has the same size independently from the screen and from DPI. I've found this and this answer that I think should solve my problem but don't. In desktop the size is ok, but in my phone is too big. This is the result on my Nexus 4: (768x1280, 2.0 density) And this is the result on my MacBook: (480x800, 0.6875 density) I'm using the Open Sans Condensed (link to google fonts) As you can see on desktop looks good, but on the phone is so big. Here the code of my test: public class TextTest extends ApplicationAdapter { private static final String TAG = TextTest.class.getName(); private static final String TEXT = "Tap the screen to start"; private OrthographicCamera camera; private Viewport viewport; private SpriteBatch batch; private BitmapFont font; @Override public void create () { Gdx.app.log(TAG, "Screen size: "+Gdx.graphics.getWidth()+"x"+Gdx.graphics.getHeight()); Gdx.app.log(TAG, "Density: "+Gdx.graphics.getDensity()); camera = new OrthographicCamera(); viewport = new ExtendViewport(Gdx.graphics.getWidth(), Gdx.graphics.getWidth(), camera); batch = new SpriteBatch(); FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/OpenSans-CondLight.ttf")); font = createFont(generator, 64); generator.dispose(); } private BitmapFont createFont(FreeTypeFontGenerator generator, float dp) { FreeTypeFontGenerator.FreeTypeFontParameter parameter = new FreeTypeFontGenerator.FreeTypeFontParameter(); int fontSize = (int)(dp * Gdx.graphics.getDensity()); parameter.size = fontSize; Gdx.app.log(TAG, "Font size: "+fontSize+"px"); return generator.generateFont(parameter); } @Override public void render () { Gdx.gl.glClearColor(1, 1, 1, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); int w = -(int)(font.getBounds(TEXT).width / 2); batch.setProjectionMatrix(camera.combined); batch.begin(); font.setColor(Color.BLACK); font.draw(batch, TEXT, w, 0); batch.end(); } @Override public void resize(int width, int height) { viewport.update(width, height); } @Override public void dispose() { font.dispose(); batch.dispose(); } } I'm trying to find a neat way to fix this. What I'm doing wrong? is the camera? the viewport? UPDATE: What I want is to keep the same margins in proportion, independently of the screen size or resolution. This image illustrates what I mean.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >