How can I create a @pattern regexp for pp-gfg76482_8498680983?  Thanks in advance.
262
I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?
19883
How do I get the substring " It's big \"problem  " using a regular expression?  s = ' function(){  return " It\'s big \"problem  ";  }';
18468
I'm developing an algorithm to parse a number out of a series of short-ish strings. These strings are somewhat regular, but there's a few different general forms and several exceptions. I'm trying to build a set of regexes that will handle the various forms and exceptions; I'll apply them one after another to see if I get a match.   One of these forms goes something like this:  X (Y) Z   Where:   X is a number I want to capture.  Z is static, pre-defined text. it's basically how I determine whether this particular form is applicable or not. Y is a a string of unknown length and content, surrounded by parenthesis.    Also: Y is optional; it doesn't always appear in a string with Z and X. So, I want to be able to extract the numbers from all of these strings:   10 Z 20 (foo) Z 30 (bar) Z   Right now, I have a regex that will capture the first one:  ([0-9]+) +Z   My problem is that I don't know how to construct a regex that will match a series of characters if and only if they're enclosed in parenthesis. Can this be done in a single regex?
75489
I am using IBM DB2.  So, I am retrieving a column named SSN from a table. I have to apply the following regex on that column:  ([1-57-8][0-9]{2} |0([1-9][0-9] |[0-9][1-9]) |6([0-57-9][0-9] |[0-9][0-57-9])) ([1-9][0-9]|[0-9][1-9])([1-9]\d{3}|\d[1-9]\d{2}|\d{2}[1-9]\d|\d{3}[1-9])   Someone suggested to me that I have to write a function/procedure in the query to validate that the SSN picked from the db follows this regex else it should not be stored in the result set of the query.  I don't know how to write a function or a procedure in SQL, can you please help me out here?
35188
I didn't get the answer to this anywhere. What is the runtime complexity of a Regex match and substitution?  Edit: I work in python. But would like to know in general about most popular languages/tools (java, perl, sed).
83873
Is it possible to do something like this?  var pattern = /some regex segment/ + /* comment here */     /another segment/;   Or do I have to use new RegExp() syntax and concatenate a string? I'd prefer to use the literal as the code is both more self-evident and concise.
42865
Can anyone help me with this question: I know it before, but I have tried to solve it myself and didnt succeed. what is the regular expression for this language: L=all words that have 00 or 11 but not both.  Thank you!
119008
Given this string:  SET @text = "&lt;a href=""https://salesforce.stackexchange.com""target=""_blank""&gt;Salesforce&lt;/a&gt; &lt;a href=""https://stackoverflow.com"" target=""_blank""&gt;Everything else&lt;/a&gt;"   And this function:  SET @matching = '\s+(?:[^&gt;]*?\s+)?href="([^"]*)"' SET @output = RegExMatch(@text, @matching, 1)   How can I manage to find and print an arbitrary number of matches in my string? E.g. in above example, I would like to present e.g. a rowset with each URL in each row.
112080
I'm looking for the ultimate postal code and zip code regex. I'm looking for something that will cover most (hopefully all) of the world.
66513
Is there a way to debug a regular expression in Python? And I'm not referring to the process of trying and trying till they work :)  Here is how regexes can be debugged in Perl:   use re 'debug';  my $str = "GET http://some-site.com HTTP/1.1"; if($str =~/get\s+(\S+)/i) {     print "MATCH:$1\n"; }   The code above produces the following output on my computer when ran:   Compiling REx "get\s+(\S+)" Final program:    1: EXACTF  (3)    3: PLUS (5)    4:   SPACE (0)    5: OPEN1 (7)    7:   PLUS (9)    8:     NSPACE (0)    9: CLOSE1 (11)   11: END (0) stclass EXACTF  minlen 5 Matching REx "get\s+(\S+)" against "GET http://some-site.com HTTP/1.1" Matching stclass EXACTF  against "GET http://some-site.com HTTP/1.1" (33 chars)    0           |  1:EXACTF (3)    3        |  3:PLUS(5)                                   SPACE can match 1 times out of 2147483647...    4       |  5:  OPEN1(7)    4       |  7:  PLUS(9)                                     NSPACE can match 20 times out of 2147483647...   24       |  9:    CLOSE1(11)   24       | 11:    END(0) Match successful! MATCH:http://some-site.com Freeing REx: "get\s+(\S+)"
93853
How would you go about creating a random alpha-numeric string that matches a certain regular expression?  This is specifically for creating initial passwords that fulfill regular password requirements.
13500
Input file1 is:  dog 123 4335 cat 13123 23424  deer 2131 213132 bear 2313 21313   I give the match the  pattern from in other file ( like dog 123 4335 from   file2).  I match the pattern of the line is dog 123 4335 and after printing all lines without match line my output is:   cat 13123 23424 deer 2131 213132 bear 2313 21313   If only use without address of line only use the pattern, for example 1s how to  match and  print the lines?
113533
I'm trying to write a regex that will parse out the directory and filename of a fully qualified path using matching groups.  so...  /var/log/xyz/10032008.log   would recognize group 1 to be "/var/log/xyz" and group 2 to be "10032008.log"  Seems simple but I can't get the matching groups to work for the life of me.  NOTE:  As pointed out by some of the respondents this is probably not a good use of regular expressions.  Generally I'd prefer to use the file API of the language I was using.  What I'm actually trying to do is a little more complicated than this but would have been much more difficult to explain, so I chose a domain that everyone would be familiar with in order to most succinctly describe the root problem.
86651
ab&amp;2e;1652769179"/>   i did correlction using rerular expression ab&amp;2e;(.*?)"/>  but during execution some times extra text (cd&amp;3d;) adding to the data like  ab&amp;2e;cd&amp;3d;1652769179"/>  So need to ignore data "cd&amp;3d;"  Please let me know any idea to ignore text cd&amp;3d; and capture 1652769179 only using expresiion ab&amp;2e;(.*?)"/>  Thanks Raghav
29686
I recently read somewhere that writing a regexp to match an email address, taking into account all the variations and possibilities of the standard is extremely hard and is significantly more complicated than what one would initially assume.  Can anyone provide some insight as to why that is?    Are there any known and proven regexps that actually do this fully?  What are some good alternatives to using regexps for matching email addresses?
33583
How to extract a text part by regexp in linux shell? Lets say, I have a file where in every line is an IP address, but on a different position. What is the simplest way to extract those IP addresses using common unix command-line tools?
32515
I'm after a regex that will validate a full complex UK postcode only within an input string. All of the uncommon postcode forms must be covered as well as the usual. For instance:  Matches   CW3 9SS SE5 0EG SE50EG se5 0eg WC2H 7LT   No Match   aWC2H 7LT WC2H 7LTa WC2H   How do I solve this problem?