Search Results

Search found 6715 results on 269 pages for 'preg match all'.

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

  • ereg to preg conversion

    - by musoNic80
    I'm a complete novice when it comes to regex. Could someone help me convert the following expression to preg? ereg('[a-zA-Z0-9]+[[:punct:]]+', $password) An explanation to accompany any solution would be especially useful!!!!

    Read the article

  • preg match count matches

    - by Scarface
    Hey guys quick question, I have a preg match statement, and it checks for matches, but I was wondering how you can count the matches. Any advice appreciated. $message='[tag] [tag]'; preg_match('/\[tag]\b/i',$message); for example a count of this message string should lead to 2 matches

    Read the article

  • implementing match-making & community system for multiplayer games

    - by kamziro
    These days, games often have multiplayer portals with chat channels & match making system for the multiplayer aspects of the game. An example would be battle.net, magic the gathering online's chat rooms, halo etc. Now, for the rest of us indie gamers that probably won't be able to spend much development effort on creating those back-ends from scratch, what options do we have? I was thinking of something along the line of using IRC as the backbone of the system. From there, the "community" aspect and implement player tracking, game tracking and match making on top of that. It seems to be what the old battle.net (brood war era) used to be. The question is, is this easy to do? What does it take to run an irc server, and I suppose this also requires writing an IRC client (which seems to have been done a lot these days?)? If there are other ways as well (say, an open framework for this stuff), let's hear them too.

    Read the article

  • Warning: preg_match() [function.preg-match]: Unknown modifier '/' problem

    - by SonOfOmer
    I am building custom implementation of php MVC routing engine, and I have custom routes like one in $routes array below. Each time when I send asynchronous GET request like xmlhttp.open("GET","someurl"); I get following message Warning: preg_match() [function.preg-match]: Unknown modifier '/' problem but with synchronous (normal) request it all works fine <?php $routes = array( array('url' => '/^someurl$/', 'controller' => 'somecontroller', 'view' => 'someview') ); $url = $_SERVER['REQUEST_URI']; $url = substr( $url, 1 ); $params = array(); $route_match = false; foreach($routes as $urls => $route) { if(preg_match($route['url'], $url, $matches)) { $params = array_merge($params, $matches); $route_match = true; break; } } require_once(CONTROLLER_PATH.$route['controller'].'.php'); ?> string(11) "/^someurl$/" is the result of var_dump($route['url']); Thanks.

    Read the article

  • Display particular data into a file

    - by Avinash K G
    I'm new to Ubuntu and have been using it for a couple of weeks now. Recently I encountered a problem where in I had to display a particular data on to a file. Here is the output displayed on the terminal. Potential vulnerability found (CVE-2009-4028) CVSS Score is 6.8 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2009-4030) CVSS Score is 4.4 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2009-5026) CVSS Score is 6.8 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0075) CVSS Score is 1.7 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0087) CVSS Score is 4.0 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0101) CVSS Score is 4.0 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0102) CVSS Score is 4.0 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0112) CVSS Score is 3.5 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0113) CVSS Score is 5.5 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0114) CVSS Score is 3.0 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0115) CVSS Score is 4.0 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0116) CVSS Score is 4.9 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0118) CVSS Score is 4.9 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0119) CVSS Score is 4.0 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0120) CVSS Score is 4.0 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0484) CVSS Score is 4.0 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0485) CVSS Score is 4.0 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0490) CVSS Score is 4.0 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0492) CVSS Score is 2.1 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0540) CVSS Score is 4.0 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0553) CVSS Score is 7.5 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0574) CVSS Score is 4.0 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2012-0583) CVSS Score is 4.0 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2013-1492) CVSS Score is 7.5 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2013-1506) CVSS Score is 2.8 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) Potential vulnerability found (CVE-2013-1521) CVSS Score is 6.5 Full vulnerability match (incl. edition/language) File "/usr/sbin/mysqld" (CPE = cpe:/a:mysql:mysql:5.1:::) on host glynis-desktop (key glynis-desktop) I intend to display the Potential vulnerability found field and the corresponding score alone. There seems to be about 9995 entries and I would like to display all of them. I have been using this command as of now awk '/CVSS Score is/ < /Potential vulnerability found/' output.txt but this seems to display only the name of the vulnerability or the score. How do I display this in file(text,excel) such that all the vulnerability and the corresponding score willbe displayed. Any help would be appreciated Thank you.

    Read the article

  • Atom feed validator keeps showing Self reference doesn't match document location

    - by Dino
    I am creating an atom feed, but when I validate it I keep getting: Self reference doesn't match document location and the specific line that is causing the error is: <link rel="self" type="application/atom+xml" href="http://www.example.com/test.rss"/> Please can anyone advise what the error is? Ps. I noticed an up arrow just at the end of that line. (presumably something to do with that bbut not sure)

    Read the article

  • List columns where collation doesn't match database collation

    - by TiborKaraszi
    Below script lists all database/table/column where the column collation doesn't match the database collation. I just wrote it for a migration project and thought I'd share it. I'm sure lots of tings can be improved, but below worked just fine for me for a one-time execution on a number of servers. IF OBJECT_ID ( 'tempdb..#res' ) IS NOT NULL DROP TABLE #res GO DECLARE @db sysname , @sql nvarchar ( 2000 ) CREATE TABLE #res ( server_name sysname , db_name sysname , db_collation sysname , table_name...(read more)

    Read the article

  • List columns where collation doesn't match database collation

    - by TiborKaraszi
    Below script lists all database/table/column where the column collation doesn't match the database collation. I just wrote it for a migration project and thought I'd share it. I'm sure lots of tings can be improved, but below worked just fine for me for a one-time execution on a number of servers. IF OBJECT_ID ( 'tempdb..#res' ) IS NOT NULL DROP TABLE #res GO DECLARE @db sysname , @sql nvarchar ( 2000 ) CREATE TABLE #res ( server_name sysname , db_name sysname , db_collation sysname , table_name...(read more)

    Read the article

  • Grep only shows last match

    - by Bannix
    I've got a problem with grep. When I use it as followed, it only shows the last match in every line and what follows after it. For example: If I use tail -F example.log | grep -a -i -e "word1" -e "word2" -e "word3" and example.log contains word1 this word2 is word3 a test only "word3 a test" will be displayed. How can I display the whole line and not only the last matched string in a line + rest of the line? I hope you can understand what I mean and help me :) Greetings, Bannix

    Read the article

  • match only extionless url

    - by user162428
    I want a regex expression which only match extionless url. In otherwords if a extion is present in url then completely ignore it. /(.+)/(.+) this will match both extionless and with extenion url i want to match only extionless URL www.site.com/sports/cricket should match www.site.com/sports/cricket.aspx shouldn't match Thanks in advance

    Read the article

  • WCF Error when using “Match Data” function in MDS Excel AddIn

    - by Davide Mauri
    If you’re using MDS and DQS with the Excel Integration you may get an error when trying to use the “Match Data” feature that uses DQS in order to help to identify duplicate data in your data set. The error is quite obscure and you have to enable WCF error reporting in order to have the error details and you’ll discover that they are related to some missing permission in MDS and DQS_STAGING_DATA database. To fix the problem you just have to give the needed permession, as the following script does: use MDS go GRANT SELECT ON mdm.tblDataQualityOperationsState TO [VMSRV02\mdsweb] GRANT INSERT ON mdm.tblDataQualityOperationsState TO [VMSRV02\mdsweb] GRANT DELETE ON mdm.tblDataQualityOperationsState TO [VMSRV02\mdsweb] GRANT UPDATE ON mdm.tblDataQualityOperationsState TO [VMSRV02\mdsweb] USE [DQS_STAGING_DATA] GO ALTER AUTHORIZATION ON SCHEMA::[db_datareader] TO [VMSRV02\mdsweb] ALTER AUTHORIZATION ON SCHEMA::[db_datawriter] TO [VMSRV02\mdsweb] ALTER AUTHORIZATION ON SCHEMA::[db_ddladmin] TO [VMSRV02\mdsweb] GO Where “VMSRV02\mdsweb” is the user you configured for MDS Service execution. If you don’t remember it, you can just check which account has been assigned to the IIS application pool that your MDS website is using:

    Read the article

  • Multi database link and mix and match email alert

    - by menardmam
    I have a site which is a large database of people that have different knowledge in different domains, such as teaching (maths, french, science etc...) On the site there is a page where you can search people base on different request, such as distance from home, grade, sex. Now, I would like to add a page where people that are looking for mentor will fill a request, and when a tutor in his area of search will match request, a email will be send to this researcher. Because I know for sure, that when in January you look for a math teacher for your 10 year old son, and you find none, you won't go again in February, March... and on and on just to see. Maybe there is one now, you want to be informed when the tutor will get into database automatically (more or less like www.jobboom.com) So the question is, what CMS do I need to be able to do that ? Wordpress, drupal or something custom made?

    Read the article

  • Domain appears taken when searched from a different host, but whois says 'No match'

    - by Nanda
    I have recently registered a new .name domain. It is just myfirstname.name, something like nanda.name. My debit card has been billed, but my domain control panel doesn't show any information regarding the new domain. I have raised a ticket with their support and there is no response yet. It's been 3 days. I checked some other registrars and almost all of them say that nanda.name is taken, but when I search whois either from my command line or the numerous whois web services, I get No match as answer each time. What gives? PS : I should add that this registrar's support is known to suck, which, by the time I found, is a bit late.

    Read the article

  • If-Modified-Since vs If-None-Match

    - by Roger
    This question is based on this article response header HTTP/1.1 200 OK Last-Modified: Tue, 12 Dec 2006 03:03:59 GMT ETag: "10c24bc-4ab-457e1c1f" Content-Length: 12195 request header GET /i/yahoo.gif HTTP/1.1 Host: us.yimg.com If-Modified-Since: Tue, 12 Dec 2006 03:03:59 GMT If-None-Match: "10c24bc-4ab-457e1c1f" HTTP/1.1 304 Not Modified In this case browser is sending both If-None-Match and If-Modified-Since. My question is on the server side do I need to match BOTH etag and If-Modified-Since before I send 304. Or Should I just look at etag and send 304 if etag is a match. In this case I am ignoring If-Modified-Since .

    Read the article

  • Excel formula: can MATCH recognise 'n'&"01", or 'n'&"02 "

    - by Mike
    I have an Excel sheet (source) that has simple ID numbers in column A (01 to 40000). In another sheet (child) I have these same ID numbers in column A but with either an additional 01 or 02 added on; e.g. 0101 or 0102, 250001 or 250002, etc. Therefore this list of ID numbers is nearly twice as long. In column B there are figures. I'm trying to extract the data from column B in the child sheet, and based on whether it has a "01" or a "02" place the figure into either column B or C of the source sheet. My idea is to use INDEX/MATCH, but I'm not sure how the match would be written to take into account the NOT EXACT MATCH of the lookup value. MATCH(A1&"01",child!A1:A100000,). Any tips and links greatly appreciated. Mike.

    Read the article

  • If-Modified-Since vs If-None-Match

    - by Roger
    This question is based on this article response header HTTP/1.1 200 OK Last-Modified: Tue, 12 Dec 2006 03:03:59 GMT ETag: "10c24bc-4ab-457e1c1f" Content-Length: 12195 request header GET /i/yahoo.gif HTTP/1.1 Host: us.yimg.com If-Modified-Since: Tue, 12 Dec 2006 03:03:59 GMT If-None-Match: "10c24bc-4ab-457e1c1f" HTTP/1.1 304 Not Modified In this case browser is sending both If-None-Match and If-Modified-Since. My question is on the server side do I need to match BOTH etag and If-Modified-Since before I send 304. Or Should I just look at etag and send 304 if etag is a match. In this case I am ignoring If-Modified-Since .

    Read the article

  • Algorithm to match timestamped events from two sources

    - by urza.cc
    I have two different physical devices (one is camera, one is other device) that observe the same scene and mark when a specified event occures. (record timestamp) So they each produce a serie of timestamps "when the event was observed". Theoretically the recorded timestamps should be very well aligned: Visualized ideal situation on two time lines "s" and "r" as recorded from the two devices: but more likely they will not be so nicely aligned and there might be missing events from timeline s or r: I am looking for algorithm to match events from "s" and "r" like this: So that the result will be something like: (s1,null); (s2,r1); (s3,null); (s4,r2); (s5,r3); (null,r4); (s6,r5); Or something similar. Maybe with some "confidence" rating. I have some ideas, but I feel that this might be probably a well known problem, that has some good known solutions, but I don't know the right terminology. I am a little bit out of my element here, this is not my primary area of programming.. Any helps, suggestions etc will be appreciated.

    Read the article

  • GAPI output doesn't match Google Analytics website

    - by Yekver
    I have to get the main info about my Google Analytics Goals. I'm using GAPI lib, with this code: <?php require_once 'conf.inc'; require_once 'gapi.class.php'; $ga = new gapi(ga_email,ga_password); $dimensions = array('pagePath', 'hostname'); $metrics = array('goalCompletionsAll', 'goalConversionRateAll', 'goalValueAll'); $ga->requestReportData(ga_profile_id, $dimensions, $metrics, '-goalCompletionsAll', '', '2012-09-07', '2012-10-07', 1, 500); $gaResults = $ga->getResults(); foreach($gaResults as $result) { var_dump($result); } cut this code is output: object(gapiReportEntry)[7] private 'metrics' => array (size=3) 'goalCompletionsAll' => int 12031 'goalConversionRateAll' => float 206.93154454764 'goalValueAll' => float 0 private 'dimensions' => array (size=2) 'pagePath' => string '/catalogs.php' (length=13) 'hostname' => string 'www.example.com' (length=13) object(gapiReportEntry)[6] private 'metrics' => array (size=3) 'goalCompletionsAll' => int 9744 'goalConversionRateAll' => float 661.05834464043 'goalValueAll' => float 0 private 'dimensions' => array (size=2) 'pagePath' => string '/price.php' (length=10) 'hostname' => string 'www.example.com' (length=13) What I see on Google Analytics website on Goals URLs page with the same period of date is: Goal Completion Location Goal Completions Goal Value 1. /price.php 9,396 $0.00 2. /saloni.php 3,739 $0.00 As you can see outputs doesn't match. Why? What's wrong?

    Read the article

  • how to match a regulas expresion like (%i1) in python pexpect

    - by mike
    I want to use maxima from python using pexpect, whenever maxima starts it will print a bunch of stuff of this form: $ maxima Maxima 5.27.0 http://maxima.sourceforge.net using Lisp SBCL 1.0.57-1.fc17 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) i would like to start up pexpect like so: import pexpect cmd = 'maxima' child = pexpect.spawn(cmd) child.expect (' match all that stuff up to and including (%i1)') child.sendline ('integrate(sin(x),x)') chil.expect( match (%o1 ) ) print child.before how do i match the starting banner up to the prompt (%i1)? and so on, also maxima increments the (%i1)'s by one as the session goes along, so the next expect would be: child.expect ('match (%i2)') child.sendline ('integrate(sin(x),x)') chil.expect( match (%o2 ) ) print child.before how do i match the (incrementing) integers?

    Read the article

  • Match groups in Python

    - by Curd
    Is there a way in Python to access match groups without explicitely creating a match object (or another way to beautify the example below)? Here is an example to clarify my motivation for the question: Following perl code if ($statement =~ /I love (\w+)/) { print "He loves $1\n"; } elsif ($statement =~ /Ich liebe (\w+)/) { print "Er liebt $1\n"; } elsif ($statement =~ /Je t\'aime (\w+)/) { print "Il aime $1\n"; } translated into Python m = re.match("I love (\w+)", statement) if m: print "He loves",m.group(1) else: m = re.match("Ich liebe (\w+)", statement) if m: print "Er liebt",m.group(1) else: m = re.match("Je t'aime (\w+)", statement) if m: print "Il aime",m.group(1) looks very awkward (if-else-cascade, match object creation).

    Read the article

  • Scala contiguous match

    - by drypot
    pathTokens match { case List("post") => ("post", "index") case List("search") => ("search", "index") case List() => ("home", "index") } match { case (controller, action) => loadController(http, controller, action) case _ => null } I wanted contiguous match. but got compile error. :( (pathTokens match { case List("post") => ("post", "index") case List("search") => ("search", "index") case List() => ("home", "index") }) match { case (controller, action) => loadController(http, controller, action) case _ => null } When I wrapped first match with parenparenthesis, it worked ok. Why I need parenthesis here ?

    Read the article

  • regex pattern to match only strings that don't contain spaces PHP

    - by Jamex
    Hi, I want to match the word/pattern that is contained in the variable, but only match against the words that don't have white spaces. Please give suggestions. $var = 'look'; $array = ('look', 'greatlook', 'lookgreat', 'look great', 'badlook', 'look bad', 'look ', ' look'); matches words: look, greatlook, lookgreat, badlook non matches: look great, bad look, look (trailing space(s)), (space(s)) look. The syntax of the below functions are OK, but it matches everything $match = preg_grep ("/$var/", $array); $match = preg_grep ("/^$var/", $array); (match words with 'look' at the start) but when I include the [^\s], it gives an error $match = preg_grep ("/$var[^\s]/", $array); Parse error: syntax error, unexpected '^', expecting T_STRING or T_VARIABLE TIA

    Read the article

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