Search Results

Search found 5414 results on 217 pages for 'regular'.

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

  • Symbolic Regular Expression Exploration

    - by Robz / Fervent Coder
    This is a pretty sweet little tool. Rex (Regular Expression Exploration) is a tool that allows you to give it a regular expression and it returns matching strings. The example below creates10 strings that start and end with a number and have at least 2 characters: > rex.exe "^\d.*\d$" /k:10 This is something I could use to validate/generate the Regular Expressions I have created with both UppercuT and RoundhousE. Check out the video below: Margus Veanes - Rex - Symbolic Regular Expression Exploration Margus Veanes, a Researcher from the RiSE group at Microsoft Research, gives an overview of Rex, a tool that generates matching string from .NET regular expressions. Rex turns regular expres...

    Read the article

  • Regular-Expressions.info Thoroughly Updated

    - by Jan Goyvaerts
    RegexBuddy 4 was released earlier this month. This is a major upgrade that significantly improves RegexBuddy’s ability to emulate the features and deficiencies of the latest versions of all the popular regex flavors as well as many past versions of these flavors. Along with that, the Regular-Expressions.info website has been thoroughly updated with new content. Both the tutorial and reference sections have been significantly expanded to cover all the features of the latest regular expression flavors. There are also new tutorial and reference subsections that explain the syntax used by replacement strings when searching and replacing with regular expressions. I’m also reviving this blog. In the coming weeks you can expect blog post that highlight the new topics on the Regular-Expressions.info website. Later on I’ll blog about more intricate regex-related issues that RegexBuddy 4 emulates but that the website doesn’t talk about or only mentions in passing. RegexBuddy 4.0.0 is aware of 574 different aspects (syntactic and behavioral differences) of 94 regular expression flavors. These numbers are surely to grow with future 4.x.x releases. While RegexBuddy juggles it all with ease, that’s far too much detail to cover in a tutorial or reference that any person would want to read. So the tutorial and reference cover the important features and behaviors, while the blog will serve the corner cases as tidbits. Subscribe to the Regex Guru RSS Feed if you don’t want to miss any articles.

    Read the article

  • Regular Expression Transformation

    The regular expression transformation exposes the power of regular expression matching within the pipeline. One or more columns can be selected, and for each column an individual expression can be applied. The way multiple columns are handled can be set on the options page. The AND option means all columns must match, whilst the OR option means only one column has to match. If rows pass their tests then rows are passed down the successful match output. Rows that fail are directed down the alternate output. This transformation is ideal for validating data through the use of regular expressions. You can enter any expression you like, or select a pre-configured expression within the editor. You can expand the list of pre-configured expressions yourself. These are stored in a Xml file, %ProgramFiles%\Microsoft SQL Server\nnn\DTS\PipelineComponents\RegExTransform.xml, where nnn represents the folder version, 90 for 2005, 100 for 2008 and 110 for 2012. If you want to use regular expressions to manipulate data, rather than just validating it, try the RegexClean Transformation. The component is provided as an MSI file, however for 2005/200 you will have to add the transformation to the Visual Studio toolbox by hand. This process has been described in detail in the related FAQ entry for How do I install a task or transform component?, just select Regular Expression Transformation in the Choose Toolbox Items window. Downloads The Regular Expression Transformation is available for SQL Server 2005, SQL Server 2008 (includes R2) and SQL Server 2012. Please choose the version to match your SQL Server version, or you can install multiple versions and use them side by side if you have more than one version of SQL Server installed. Regular Expression Transformation for SQL Server 2005 Regular Expression Transformation for SQL Server 2008 Regular Expression Transformation for SQL Server 2012 Version History SQL Server 2012Version 2.0.0.87 - SQL Server 2012 release. Includes upgrade support for both 2005 and 2008 packages to 2012. (5 Jun 2012) SQL Server 2008Version 2.0.0.87 - Release for SQL Server 2008 Integration Services. (10 Oct 2008) SQL Server 2005 Version 1.1.0.93 - Added option for you to choose AND or OR logic when multiple columns have been selected. Previously behaviour was OR only. (31 Jul 2008) Version 1.0.0.76 - Installer update and improved exception handling. (28 Jan 2008) Version 1.0.0.41 - Update for user interface stability fixes. (2 Aug 2006) Version 1.0.0.24 - SQL Server 2005 RTM Refresh. SP1 Compatibility Testing. (12 Jun 2006) Version 1.0.0.9 - Public Release for SQL Server 2005 IDW 15 June CTP (29 Aug 2005) Screenshots  

    Read the article

  • Need a regular expression to parse a text body

    - by Ali
    Hi guys, I need a regular expression to parse a body of text. Basically assume this that we have text files and each of which contains random text but within the text there would be lines in the following formats - basically they are a format for denoting flight legs. eg: 13FEB2009 BDR7402 1000 UUBB 1020 UUWW FLT This line of text is always on one line The first word is a date in the format DDMMMYYYY Second word could be of any length and hold alphanumeric characters third word is the time in format HHMM - its always numeric fourth word is a location code - its almost always just alphabets but could also be alphanumeric fifth word is the arrival time in format HHMM - its always numeric sixth word is a location code - its almost always just alphabets but could also be alphanumeric Any words which follow on the same line are just definitions A text file may contain among lots of random text information one or more such lines of text. I need a way to be able to extract all this information i.e just these lines within a text file and store them with their integral parts separated as mentioned in an associative array so I have something like this: array('0'=>array('date'=>'', 'time-dept'=>'', 'flightcode'=>'',....)) I'm assuming regular expressions would be in order here. I'm using php for this - would appreciate the help guys :)

    Read the article

  • Regular expressions - finding and comparing the first instance of a word

    - by Dan
    Hi there, I am currently trying to write a regular expression to pull links out of a page I have. The problem is the links need to be pulled out only if the links have 'stock' for example. This is an outline of what I have code wise: <td class="prd-details"> <a href="somepage"> ... <span class="collect unavailable"> </td> <td class="prd-details"> <a href="somepage"> ... <span class="collect available"> </td> What I would like to do is pull out the links only if 'collect available' is in the tag. I have tried to do this with the regular expression: (?s)prd-details[^=]+="([^"]+)" .+?collect{1}[^\s]+ available However on running it, it will find the first 'prd-details' class and keep going until it finds 'collect available', thereby taking the incorrect results. I thought by specifying the {1} after the word collect it would only use the first instance of the word it finds, but apparently I'm wrong. I've been trying to use different things such as positive and negative lookaheads but I cant seem to get anything to work. Might anyone be able to help me with this issue? Thanks, Dan

    Read the article

  • Javascript to match a specific number using regular expressions

    - by ren33
    I was using javascript to detect for specific key strokes and while writing the method I thought I'd try regular expressions and the test() method and came up with: if (/8|9|37|38|46|47|48|49|50|51|52|53|54|55|56|57|96|97|98|99|100|101|102|103|104|105|110/.test(num)) { // do something if there's a match } This doesn't seem to work 100% as some values seem to make it past the regex test, such as 83. I've since moved on, but I'm still curious as to why this didn't work.

    Read the article

  • PHP and Regular Expressions question?

    - by php
    I was wondering if the codes below are the correct way to check for a street address, email address, password, city and url using preg_match using regular expressions? And if not how should I fix the preg_match code? preg_match ('/^[A-Z0-9 \'.-]{1,255}$/i', $trimmed['address']) //street address preg_match ('/^[\w.-]+@[\w.-]+\.[A-Za-z]{2,6}$/', $trimmed['email'] //email address preg_match ('/^\w{4,20}$/', $trimmed['password']) //password preg_match ('/^[A-Z \'.-]{1,255}$/i', $trimmed['city']) //city preg_match("/^[a-zA-Z]+[:\/\/]+[A-Za-z0-9\-_]+\\.+[A-Za-z0-9\.\/%&=\?\-_]+$/i", $trimmed['url']) //url

    Read the article

  • regular expression

    - by Jeeenda
    Hi I need a regular expression that'll give me something like this part ./something\", [something.sh from something like this string ("./something\", [something.sh", ["./something\", [something.sh"], [/* 37 vars */]) is that possible? I'm having real trouble making this since there's that \" escape sequence and also that ',' character, so I cannot simply use match everything instead of these characters. I'm working on unix so it's also possible to use pipeline of few greps or something like that. Thanks for advice.

    Read the article

  • java regular expression

    - by changed
    Hi I have to create a regular expression for some path conversion. Example for path are //name:value /name:value // name:value /name:value /name:value /name:value//name:value thing is how to check for // or / at the start or middle of the string and how can i specify that name can contain any of this a-zA-Z and _ Path also contains white spaces. thanks-

    Read the article

  • any character notation for php regular expression

    - by Mith
    In my regex, I want to say that within the sample text, any characters are allowed, including a-z in upper and lower case, numbers and special characters. For example, my regular expression may be checking that a document is html. therefore: "/[]+/" i have tried []+ but it does not seem to like this?

    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 expressions

    - by Infinity
    Hello guys! I need a regular expression for findin a pattern. This is the pattern: id|name|code|mobile I created a pattern for this if I want to search by id (if id = 1): .*1.*|.*|.*|.* But it matches every pattern that contains number 1. What's the problem with it?

    Read the article

  • Regular Expression to find the job id in a string

    - by Jamie
    Hi all, Please could someone help me, i will be forever appreciative. I'm trying to create a regular expression which will extract 797 from "Your job 797 ("job_name") has been submitted" or "Your Job 9212 ("another_job_name") has been submitted" etc. Any ideas? Thanks guys!

    Read the article

  • Regular Expression for $_GET query strings

    - by sandelius
    Hi there! I'm trying to find a regular expression for $_GET query strings. I have an array like this: private $_regexp = array( ':id' => '[0-9]+', ':year' => '[12][0-9]{3}', ':month' => '0[1-9]|1[012]', ':day' => '0[1-9]|[12][0-9]|3[01]', ':slug' => '[a-zA-Z0-9-]+', ':query' => '...' ); and I loop throw them to see if I have a matching wildcard like this: if ( array_key_exists($matches[0], $this->_regexp) ) { return '^('.$this->_regexp[$matches[0]].')$'; } All other regexp go throw but I've tried a whole lot of different regexp to find: ?anything=anything can't figure it out, googled like h..l but can't find anything. I've tried, for example something like this: (\?)(.*)(=)(.*) but without result... Any regexp gurus here? / Tobias

    Read the article

  • Regular expression replacing only if contained withing a regular expression match?

    - by Tower
    Hi, I have the following: [list] [*] test [*] test [*] test [/list] and I would like to create a regular expression that turns that into: <ul> <li>test</li> <li>test</li> <li>test</li> </ul> I know regex enough to replace simple tags, but in this case I need to replace li tags only if they are contained inside ul. Is there a way to check that before replacing? I am using JavaScript if that matters.

    Read the article

  • Python: Convert format string to regular expression

    - by miracle2k
    The users of my app can configure the layout of certain files via a format string. For example, the config value the user specifies might be: layout = '%(group)s/foo-%(locale)s/file.txt' I now need to find all such files that already exist. This seems easy enough using the glob module: glob_pattern = layout % {'group': '*', 'locale': '*'} glob.glob(glob_pattern) However, now comes the hard part: Given the list of glob results, I need to get all those filename-parts that matched a given placeholder, for example all the different "locale" values. I thought I would generate a regular expression for the format string that I could then match against the list of glob results (or then possibly skipping glob and doing all the matching myself). But I can't find a nice way to create the regex with both the proper group captures, and escaping the rest of the input. For example, this might give me a regex that matches the locales: regex = layout % {'group': '.*', 'locale': (.*)} But to be sure the regex is valid, I need to pass it through re.escape(), which then also escapes the regex syntax I have just inserted. Calling re.escape() first ruins the format string. I know there's fnmatch.translate(), which would even give me a regex - but not one that returns the proper groups. Is there a good way to do this, without a hack like replacing the placeholders with a regex-safe unique value etc.? Is there possibly some way (a third party library perhaps?) that allows dissecting a format string in a more flexible way, for example splitting the string at the placeholder locations?

    Read the article

  • Regular Expressions Cookbook Code Samples

    - by Jan Goyvaerts
    %COOKBOOKFRAME% One of the common criticisms against the first edition was that we didn’t have the regular expressions and code samples available for download. Since our book only has very short code snippets rather than complete programs, we (the authors) did not have these available as separate files either. But for the second edition we’re trying to do better. You can now download the code samples from the 2nd edition of Regular Expressions Cookbook. This HTML file contains all the blocks with regular expressions and source code from the book, along with the titles of the chapters, recipes, and sections that they are found in. If you have purchased the book, you can use this file to easily copy and paste the regular expressions and source code snippets. Even if you purchased the ebook, you may prefer to use this file. The regexes in the ebook are formatted with line breaks and gray dots for spaces to make them easier to read in print. The HTML file does not use such formatting, so you can copy and paste them directly. This means that some very regexes will run beyond the edge of your browser window.

    Read the article

  • O'Reilly deal of the week to 23:59 PT 4/Sept/2012 - Master Regular Expressions

    - by TATWORTH
    O'Reilly at http://shop.oreilly.com/category/deals/regular-expressions-owo.do?code=WKRGEX are offering 50% off a range of e-books on mastering Regular Expressions "Take the guesswork out of using regular expressions. Learn powerful tips for matching, extracting, and transforming text as well as the gotchas to avoid. For one week only, SAVE 50% on these e-books and discover a whole new world of mastery over your code." I recommend Mastering Regular Expression to Dot Net developer as it covers the use of regular expressions across a number of environments, including Dot Net.

    Read the article

  • C# Regular Expression for Regular Expression Parsing

    - by Chris
    I want to returns matches from a regular expression string. The regex string is: (?<TICKER>[A-Z]+)(?<SPACE>\\s)(?<MONTH_ALPHA_ABBREV>Jan|Feb|Mar|Apr|May|Jun|Jul|Sep|Oct|Nov|Dec)(?<SPACE>\\s)(?<DAY>\\d+)(?<SPACE>\\s)(?<YEAR_LONG>[2][0][0-9][0-9])(?<SPACE>\\s)(?<STRIKE_DOLLAR>\\d+(?=[.]))[.](?<STRIKE_DECIMAL>(?<=[.])\\d+)(?<SPACE>\\s)(?<PUTCALL_LONG>Call|Put) And I want to get matches for all of the group names and all of the items within square brackets (including the square brackets) outside of open and closed parenthesis. I have this regex: ((?<=[<])([A-Z]|[_])+(?=[>]))|(\\[.\\]) But this returns square bracket items within the parenthesis. To be more specific these are the matches I want from the regex at the top (keep in mind this needs to be flexible for any regex): TICKER SPACE MONTH_ALPHA_ABBREV SPACE DAY SPACE YEAR_LONG SPACE STRIKE_DOLLAR [.] STRIKE_DECIMAL SPACE PUTCALL_LONG

    Read the article

  • Big problem with regular expression in Lex (lexical analyzer)

    - by Nazgulled
    Hi, I have some content like this: author = "Marjan Mernik and Viljem Zumer", title = "Implementation of multiple attribute grammar inheritance in the tool LISA", year = 1999 author = "Manfred Broy and Martin Wirsing", title = "Generalized Heterogeneous Algebras and Partial Interpretations", year = 1983 author = "Ikuo Nakata and Masataka Sassa", title = "L-Attributed LL(1)-Grammars are LR-Attributed", journal = "Information Processing Letters" And I need to catch everything between double quotes for title. My first try was this: ^(" "|\t)+"title"" "*=" "*"\"".+"\"," Which catches the first example, but not the other two. The other have multiple lines and that's the problem. I though about changing to something with \n somewhere to allow multiple lines, like this: ^(" "|\t)+"title"" "*=" "*"\""(.|\n)+"\"," But this doesn't help, instead, it catches everything. Than I though, "what I want is between double quotes, what if I catch everything until I find another " followed by ,? This way I could know if I was at the end of the title or not, no matter the number of lines, like this: ^(" "|\t)+"title"" "*=" "*"\""[^"\""]+"," But this has another problem... The example above doesn't have it, but the double quote symbol (") can be in between the title declaration. For instance: title = "aaaaaaa \"X bbbbbb", And yes, it will always be preceded by a backslash (\). Any suggestions to fix this regexp?

    Read the article

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