Search Results

Search found 837 results on 34 pages for 'the boy za'.

Page 8/34 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • A solid nickname regexp

    - by iBram
    I want a regular expression to validate a nickname: 6 to 36 characters, it should contain at least one letter. Other allowed characters: 0-9 and underscores. This is what I have now: if(!preg_match('/^.*(?=\d{0,})(?=[a-zA-Z]{1,})(?=[a-zA-Z0-9_]{6,36}).*$/i', $value)){ echo 'bad'; } else{ echo 'good'; } This seems to work, but when a validate this strings for example: 11111111111a is not valid, but it should aaaaaaa!aaaa is valid, but it shouldn't Any ideas to make this regexp better?

    Read the article

  • mod rewrite escape chars

    - by Eugene
    hi, simple question www.site.com/page/3 to be www.site.com/page--3 so that i can read the pagenumber and page This is what i got but i dont know how to use the '--' and slash together instead. RewriteRule ^/?([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)$ index.php?page=$1&subpage=$2 Any help appreciated

    Read the article

  • Regexp match in Java

    - by tinti
    Regexp in Java I want to make a regexp who do this verify if a word is like [0-9A-Za-z][._-'][0-9A-Za-z] example for valid words A21a_c32 daA.da2 das'2 dsada ASDA 12SA89 non valid words dsa#da2 34$ Thanks

    Read the article

  • Regex - How can I achieve this ?

    - by Rachel
    I have regex as /^[a-zA-Z ]+$/ now I need to add support for unicode characters and so am using \p{L} like '/^[a-zA-Z ]+$\p{L}/'. This is not working for me and I am not sure that this is correct way of using it. I am new to regex and would appreciate any guidance. Thanks.

    Read the article

  • Need to add underscore to my regex

    - by TaMeR
    I suck at regular expression and just can't seem to figure this out. '/^[A-Za-z0-9](?:.[A-Za-z0-9]+)*$/' As it's right now it allows dots anytime after the first char and I like to add _ so that it allows both. Thanks

    Read the article

  • Regular expressions and matching question marks in URLs

    - by James P.
    I'm having trouble finding a regular expression that matches the following String. Korben;http://feeds.feedburner.com/KorbensBlog-UpgradeYourMind?format=xml;1 One problem is escaping the question mark. Java's pattern matcher doesn't seem to accept \? as a valid escape sequence but it also fails to work with the tester at myregexp.com. Here's what I have so far: ([a-zA-Z0-9])+;http://([a-zA-Z0-9./-]+);[0-9]+ Any suggestions?

    Read the article

  • Regular Expression question

    - by Mohammad Kotb
    Hi, In my academic assignment, I want make a regular expression to match a word with the following specifications: word length greater than or equal 1 and less than or equal 8 contains letters, digits, and underscore first digit is a letter only word is not A,X,S,T or PC,SW I tried for this regex but can't continue (My big problem is to make the word not equal to PC and SW) ([a-zA-Z&&[^AXST]])|([a-zA-Z][\w]{0,7}) But in the previous regex I didn't handle the that it is not PC and SW Thanks,

    Read the article

  • Regular expression not working after debugging

    - by Jaison
    I have an ASP.NET website with a regular expression validator text box. I have changed the expression in the regular expression validation property "validator expression" and after compiling (rebuild) and running, the validation CHANGEs are not reflecting. The previous validation is working fine but the changed validation is not working. Please help me! edit: First code: ([a-zA-Z0-9_-.]+)\@((base.co.uk)|(base.com)|(group.com)) Second code: @"([a-zA-Z0-9_\-.]+)@((base\.co\.uk)|(base\.com)|(group\.com)|(arg\.co\.uk)|(arggroup\.com))"

    Read the article

  • regular expression for string in c

    - by darkie15
    Hi All, I am working writing a regular expression used to validate string in C. Here is to what I have gone so far '^"[A-Za-z0-9]*[\t\n]*"$' for rules - A string should begin with double quotes - May not contain a newline character However, I am not able to capture the rule for allowing '\' or '"' in a string if preceded with '\'. Here is what I tried: '^"[A-Za-z0-9]*[\t\n]*[\\\|\\"]?"$' But this doesn't seem to work. What might be wrong with the regular expression here? Regards, darkie15

    Read the article

  • Regular expression help

    - by user268375
    I need a regular expression for which: the string is alphanumeric and have exactly 6 characters in the first half followed by hyphen(optional) followed by optional 4 characters:(cannot have more than 4 characters in the second half) so any of the following is valid 11111A 111111-1 111111-yy yyyyy-989 yyyyyy-9090 I have ^[a-zA-Z0-9]{5}(-[a-zA-Z0-9]{1,3})?$ as the regex expression what if i want to add another condition stating that the first half cannot have all zeros and also the whole expression cannot have zeros so 00000 or 00000-000 is invalid

    Read the article

  • Is it possible to perform Google Website Optimization on URL Rewritten pages?

    - by digiguru
    I have a format of pages that I want to perform an A/B comparison on using google website optimizer. the URLs look as follows - the first page I want to compare... <mywebsite.com>/request1/([a-zA-Z0-9\-]*)_([0-9]+).htm vs <mywebsite.com>/request2/([a-zA-Z0-9\-]*)_([0-9]+).htm the goal page is <mywebsite.com>/request-sent.htm How can I set this up in google website optimizer? If it's not possible, are there alternative solutions available for doing such comparison reports online?

    Read the article

  • Python/YACC Lexer: Token priority?

    - by Rosarch
    I'm trying to use reserved words in my grammar: reserved = { 'if' : 'IF', 'then' : 'THEN', 'else' : 'ELSE', 'while' : 'WHILE', } tokens = [ 'DEPT_CODE', 'COURSE_NUMBER', 'OR_CONJ', 'ID', ] + list(reserved.values()) t_DEPT_CODE = r'[A-Z]{2,}' t_COURSE_NUMBER = r'[0-9]{4}' t_OR_CONJ = r'or' t_ignore = ' \t' def t_ID(t): r'[a-zA-Z_][a-zA-Z_0-9]*' if t.value in reserved.values(): t.type = reserved[t.value] return t return None However, the t_ID rule somehow swallows up DEPT_CODE and OR_CONJ. How can I get around this? I'd like those two to take higher precedence than the reserved words.

    Read the article

  • .htaccess | Adding A Second Vanity URL

    - by Necro.
    I want to take my .htaccess file and add a second rule for another vanity URL as I already have one declaring the page. So how would I write it so I can go to my page, and the next vanity being a variable for a profile? Ex:// mywebsite.com/page/profile Here is my current .htaccess file. RewriteEngine On RewriteBase / RewriteRule ^([a-zA-Z0-9-]+)$ index.php?p=$1 [L] RewriteRule ^([a-zA-Z0-9-]+)/$ index.php?p=$1 [L]

    Read the article

  • CSS Header and Footer are breaking on Zoom-in

    - by mkhululi
    Hi, I have just finished redesigning this site (www.imustsolutions.co.za) and I have a problem with the header and the footer when the user zooms in (Cntrl + in FF). Here is the problem: The background color of the footer/header does not paint to fill the rest of the screen (horizontally) when the user zooms in. What am I doing wrong? Here is the site again: www.imustsolutions.co.za Thanks in advance. Regards, M

    Read the article

  • Rewrite rules for wordpress 3.0 (multi-site) for nginx?

    - by Zebra10
    This is the new version being used by wordpress... RewriteEngine On RewriteBase BASE/ #uploaded files RewriteRule ^(.*/)?files/$ index.php [L] RewriteCond %{REQUEST_URI} !.*wp-content/plugins.* RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L] # add a trailing slash to /wp-admin RewriteCond %{REQUEST_URI} ^.*/wp-admin$ RewriteRule ^(.+)$ $1/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule . - [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] RewriteRule . index.php [L] What would it look like in Nginx?

    Read the article

  • php regular expression assistance bold a filename

    - by jason
    I am not very good, with regular expression in php I am trying to get a reg_expression to find all file names such as /file-name-here.php and make it bold. This expression works in Flash but not in php it also doesn't accept the '-' i'm not sure why i can't get it to work with preg_replace /(https?://)?(www\.)?([a-zA-Z0-9_%]*)\b\.[a-z]{2,4}(\.[a-z]{2})?((/[a-zA-Z0-9_%]*)+)?(\.[a-z]*)?/g

    Read the article

  • Preg_replace regex, newlines, connection resets

    - by bob_the_destroyer
    I have mixed html, custom code, and regular text I need to examine and change frequently on several, long wiki pages. I'm working with a proprietary wiki-like application and have no control over how the application functions or validates user input. The layout of pages that users add must follow a very specific standard layout and always include very specific text in only certain places - a standard which frequently changes. If users add pages that are so far out of the standard, they will be deleted. The fact that all this is obviously a complete waste of time when alternative platforms to do exactly what's needed here exist is already understood. I've built a PHP based API to automate this post-validation and frequent restandardization process for me. I've been able set up regex patterns to handle all this mixed text, and they all work fine for handling single lines. The problem I have is this: Poorly formed regex against long text with line breaks can lead to unexpected results, such as connection resets. I have no access to server-side logs to troubleshoot. How do I overcome this? This is just one example of what I currently have: {column} and {section} tags I'm searching for below can have any number of attributes, and wrap any text. {section} may or may not exist and may or may not be one or more lines under {column}, but it has to be wrapped inside {column}. {column} itself may or may not exist, and if it doesn't, I don't care. I want to grab the inner section contents and wrap it in an html div tag. I can't recall the exact pattern I'm using offhand at the moment, but it's close enough... $pattern = "/\{column:id=summary([|]?([a-zA-Z0-9-_ ]+[:][a-zA-Z0-9-_ ]+[ ]?))\}(.*)({section([|]([a-zA-Z0-9-_ ]+[:][a-zA-Z0-9-_ ]+[ ]?))\}(.*)\{section\}(.*))?{column\}/s"; $replacement = "{html}<div id='summary'$7</div{html}"; $text = preg_replace($pattern, $replacement, $subject); Handling the {column} and {section} attributes and passing only valid HTML parameters to the new html div or a subtext of it is itself a challenge, but my main focus above right now is getting that (.*) value within {section} above without causing a connection reset. Any pointers?

    Read the article

  • Limit number of alpha characters in regular expression

    - by beardedd
    I've been struggling to figure out how to best do this regular expression. Here are my requirements: Up to 8 characters Can only be alphanumeric Can only contain up to three alpha characters [a-z] (zero alpha characters are valid to) Any ideas would be appreciated. This is what I've got so far, but it only looks for contiguous letter characters: ^(\d|([A-Za-z])(?!([A-Za-z]{3,}))){0,8}$

    Read the article

  • How do I extend this regex to match www.example.com in addition to http://example.com?

    - by algorithmicCoder
    I've got a regex for detecting links that works pretty well for urls of the form http://example.com, http://www.example.com etc but not for www.example.com I am trying to extend what i have so that www.foo.com also gets matched without breaking previous functionality. I tried this: /\(?\b((http|https|ftp):\/\/|)(www\.)[-A-Za-z0-9+&@#\/%?=~_()|!:,.;]*[-A-Za-z0-9+&@#\/%=~_()|]/ but this only works when www is present and doesn't work e.g. for http://example.com ...

    Read the article

  • htaccess url rewrite,remove querystring and file extension

    - by Miranda
    my current url is something like: http://something.somedomain.com/about_us/profile.php?tab1=about_us a more complicated on is: http://something.somedomain.com/exchange_hosting/feature/outlook_web_access.php?tab1=exchange_hosting&tab2=feature&tab3=outlook_web_access i want to make them shorter: http://something.somedomain.com/about_us/profile http://something.somedomain.com/exchange_hosting/feature/outlook_web_access my .htaccess ################################# # Directory Indexes # ################################# DirectoryIndex index.php ######################################### # REWRITE RULES # ######################################### RewriteEngine On RewriteBase / Options +FollowSymlinks <IfModule mod_rewrite.c> #not a file RewriteCond %{REQUEST_FILENAME} !-f #not a dir RewriteCond %{REQUEST_FILENAME} !-d #this dosen't work #RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ /$1.php?tab1=$0&tab2=$1 </IfModule> # END #

    Read the article

  • How do i convert this Mod_rewrite rule to nginx

    - by bacho
    This is the Htacces rule: RewriteEngine on RewriteRule ^([A-Za-z0-9-]+)/?$ ir.php?id=$1 how should I pass it to a Nginx compliant rewrite rule... i read the doc and did this: rewrite ^([A-Za-z0-9-]+)/?$ ir.php?id=$1 last; But didnt work. and another question: Is there any equivalent of .htaccess to Nginx (per directory rules) Thanks

    Read the article

  • help with regex needed

    - by user268375
    I need a regular expression with the following needs: the string is alphanumeric and have exactly 6 characters in the first half followed by hyphen(optional) followed by optional 4 characters:(cannot have more than 4 characters in the second half) so any of the following is valid 11111A 111111-1 111111-yy yyyyy-989 yyyyyy-9090 i thought this expression /[a-zA-Z0-9]([-])?[a-zA-Z0-9]{5,10}$/; should work but i m unable to get it working correctly. Any help will be appreciated,

    Read the article

  • Looking to clean up a small ruby script.

    - by Badweather
    I'm looking for a much more idiomatic way to do the following little ruby script. File.open("channels.xml").each do |line| if line.match('(mms:\/\/{1}[a-zA-Z\.\d\/\w-]+)') puts line.match('(mms:\/\/{1}[a-zA-Z\.\d\/\w-]+)') end end Thanks in advance for any suggestions.

    Read the article

  • Regular expression - starting and ending with a letter, accepting only letters, numbers and _

    - by jreid9001
    I'm trying to write a regular expression which specifies that text should start with a letter, every character should be a letter, number or underscore, there should not be 2 underscores in a row and it should end with a letter or number. At the moment, the only thing I have is ^[a-zA-Z]\w[a-zA-Z1-9_] but this doesn't seem to work properly since it only ever matches 3 characters, and allows repeated underscores. I also don't know how to specify requirements for the last character.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >