Search Results

Search found 17715 results on 709 pages for 'regular language'.

Page 60/709 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • string directly before with regular expressions?

    - by acidzombie24
    I have been given a file that has its string like this blah blah DUMMY blah blah DUMMY blah blah VALUE blahX blahY KEY Some values/keys are optional, i cannot depend on order. With regular expressions using C# how do i write an regex that takes the value directly behind the key? I know i could write it in such a way it will match the first DUMMY but i cant think of how to make the VALUE instead.

    Read the article

  • Regular Expression Question

    - by zyq524
    I'm trying to use regular expression to extract the comments in the heading of a file. For example, the source code may look like: //This is an example file. //Please help me. #include "test.h" int main() //main function { ... } What I want to extract from the code are the first two lines, i.e. //This is an example file. //Please help me. Any idea?

    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

  • C# regular expression

    - by vert
    How would I write a regular expression (C#) which will check a given string to see if any of its characters are characters OTHER than the following: a-z A-Z Æ æ Å å Ø ø - ' Thanks!

    Read the article

  • PHP regular expression for positive number with 0 or 2 decimal places

    - by Peter
    Hi I am trying to use the following regular expression to check whether a string is a positive number with either zero decimal places, or 2: ^\d+(\.(\d{2}))?$ When I try to match this using preg_match, I get the error: Warning: preg_match(): No ending delimiter '^' found in /Library/WebServer/Documents/lib/forms.php on line 862 What am I doing wrong?

    Read the article

  • using regular expression in Java

    - by Mrityunjay
    Hi, i need to check a string that should contain only ABCDEFG characters, in any sequence and with only 7 characters. Please let me know the correct way of using regular expression. as corrently i am using String abs = "ABPID"; if(!Pattern.matches("[[ABCDEFG]", abs)) System.out.println("Error"); i am using the following code which works when i use the String abcdefg but for other cases it fails. please help me out.

    Read the article

  • Using Regular Expression in VC++

    - by Benit
    Hi , I am finding Email ids in mu project, where I am preprocessing the input using some Regular Expression. RegExpPhone6.RegComp("[\[\{\(][ -]?[s][h][i][f][t][ -]?[+-][2][ -]?[\]\}\)]"); Here while I am compiling i am getting a warning msg like Warning 39 warning C4129: ')' : unrecognized character escape sequence How can i resolve this ? Why this is occuring and Where will it affect? Kindly help me...

    Read the article

  • Help with Regular Expression

    - by shivesh
    Hello I need help with Regular Expression, I want to match each section (number and it's text - 2 groups), the text can be multi line, each section ends when another section starts (another number) or when .END is reached or EOF. Demo Expression: \(\d{1,3}\) ([\s\S]*?)(\.END|\(\d{1,3}\)) Input text: (1) some text some text some text some text some text some text (2) some text some textsome text (3) some textsome text some textsome textsome text (4) some text .END first group should match number (with brackets) and second group should match corresponded text.

    Read the article

  • Learning Regular Expressions

    - by Teifion
    I already know the basics of RegEx but I'm not sure where to go from here, I'm looking for both a good and above all easy to understand guide but I am also looking for things to use RegEx's for, it's all well and good reading about it but if you never use them then they will not stick in your mind. I have already found regular-expressions.info but I'm sure there are more.

    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

  • java regular expression

    - by BSingh
    I am trying to write a regular expression for somethin like s1 = I am at Boston at Dowtown s2 = I am at Miami I am interested in the words after at eg: Boston, Downtown, Miami I have not been successful in creating a regex for that. Somethin like > .*? (at \w+)+.* gives just Boston in s1 (Downtown is missed). it just matches the first "at" Any suggestions

    Read the article

  • perl: generating permutations from a regular expression

    - by wibble
    I know you can generate all permutations from a list, using glob or Algorithm::Permute for example - but how do you generate all possible permutations from a regular expression? i want to do like: @perms = permute( "/\s[A-Z][0-9][0-9]/" ); sub permute( $regex ) { # code - put all permutations of above regex in a list return @list; }

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >