Search Results

Search found 9016 results on 361 pages for 'regex libraries'.

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

  • Open dialog box won't show files in libraries, but explorer will

    - by Alex
    I have the weirdest problem when trying to open or save files. When I try to get to "My Documents" through the "Libraries" side link it won't show any of my files. It will show them if I go around from the C:// drive into the user files though. I thought it was because I didn't have the right location defined for the "Libraries" shortcut, but when I use "Explorer" to open my "Libraries" it shows all the files. Any ideas?

    Read the article

  • JavaScript Regex Problem

    - by oraclee
    Hi all; Csharp Regex Pattern: Regex rg = new Regex("(?i)(?<=>)[^<]+(?=</TD>)"); JavaScript Regex Pattern: var pattern = (?i)(?<=>)[^<]+(?=</TD>); var result = str.match(pattern); Csharp Regex pattern work, but javascript regex pattern not work pls help ?

    Read the article

  • Trying to do a batch rename, can't figure out the proper RegEx

    - by trezy
    I'm trying to rename my movie collection. All of the files are currently named using dots instead of spaces, i.e. Men.in.Black.avi. I want to replace all of the dots with spaces which isn't terribly difficult, but I need to preserve the last dot for the file extension, i.e. .avi, .mp4, .ogg, etc. My Googling has provided no solutions. I'm also a Javascript developer and could see some snazzy applications for it. So, any suggestions?

    Read the article

  • New Windows 7 Libraries created keep disappearing

    - by Sean
    I've just got a new laptop that came pre-installed with Windows 7 Professional edition. One of the new features of Windows 7 is Libraries. I'm familiar with how this works and am trying to create my own library called 'Work' to include all my work folders on my computer. However every time I create a new custom Library, after I rename it, it disappears from my Library menu. Each time I click Libraries in the Explorer, I keep seeing the same 4 default libraries, I.e. Documents, Pictures, Music, and Video. So when I try to create a new Library called 'Work' again, I get a pop up message "Do you want to rename New library to Work (2).Library-Microsoft?" Which means that my original work library still exists but for some reason I can't see it. Can someone please help me figure out why this is happening?

    Read the article

  • Organize code in Chef: libraries, classes and resources

    - by ColOfAbRiX
    I am new to both Chef and Ruby and I am implementing some scripts to learn them. Now I am facing the problem of how to organize my code: I have created a class in the library directory and I have used a custom namespace to maintain order. This is a simplified example of my file: # ~/chef-repo/cookbooks/mytest/libraries/MyTools.rb module Chef::Recipe::EP class MyTools def self.print_something( text ) puts "This is my text: #{text}" end def self.copy_file( dir, file ) cookbook_file "#{dir}/#{file}" do source "#{dir}/#{file}" end end end end From my recipe I call both methods: # ~/chef-repo/cookbooks/mytest/recipes/default.rb EP::MyTools.print_something "Hello World!" EP::MyTools.copy_file "/etc", "passwd" print_something works fine, but with copy_file I get this error: undefined method `cookbook_file' for Chef::Recipe::EP::FileTools:Class It's clear to me that I don't know how to create libraries in Chef or I don't know some basic assumptions. Can anyone help me, please? I am looking for a solution of this problem (organize my code, libraries, use resources in classes) or, better, a good Chef documentation as I find the documentation very deficient in clarity and disorganized so that research through it is a pain.

    Read the article

  • Homegroup libraries visible but can't be opened

    - by majocha
    I have 2 Windows 7 PCs in a home network. When I create a homegroup, the libraries I share are visible on the opposing machine but when I doubleclick them nothing happens - no error message, nothing at all. It is the same on both computers. The homegroup works to the extent that the printer I shared is visible and can print from the other computer. Only the libraries are inaccessible. What I tried and checked so far, without result: disabling firewall file and printer sharing, MS Networks client enabled in network properties deleting and recreating homegroup reset homegroup by deleting C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\PeerNetworking unsharing and sharing again the libraries

    Read the article

  • simscan's regex

    - by alexus
    -bash-3.2# cat /var/qmail/control/simcontrol :clam=yes,spam=yes,spam_hits=7.0,regex=^Subject\072.*(7.|8.)\%.*:(?m)\.ru\/\n{21} -bash-3.2# cat ./cur/msg.1268526916.764928.8759:2,S | pcregrep -M '(?m)\.ru\/\n{21}' Party's over for Clinton http://260.noonwife.ru/ of because Abraham is large Confessional murdered the for -bash-3.2# grep -c REGEX /var/log/qmail/smtpd/@* /var/log/qmail/smtpd/@400000004b9c134f0095ecdc.s:25 /var/log/qmail/smtpd/@400000004b9c144c2748a9dc.s:6 /var/log/qmail/smtpd/@400000004b9c16eb2ac491fc.s:12 /var/log/qmail/smtpd/@400000004b9c1c61239185ac.s:28 /var/log/qmail/smtpd/@400000004b9c216a3013fdb4.s:29 /var/log/qmail/smtpd/@400000004b9c26b11fb5263c.s:22 /var/log/qmail/smtpd/@400000004b9c2b2505d2035c.s:25 /var/log/qmail/smtpd/@400000004b9c2ec3139530f4.s:12 /var/log/qmail/smtpd/@400000004b9c312c160d7454.s:4 -bash-3.2# first regex works, yet i can't get it to match second, even though pcregrep matches it using same regex just fine any ideas?

    Read the article

  • Efficiently Combine MatchCollections in .Net Regex

    - by Laramie
    In the simplified example, there are 2 Regular Expressions, one case sensitive, the other not. The idea would be to efficiently create an IEnumerable collection (see "combined" below) combining the results. string test = "abcABC"; string regex = "(?<grpa>a)|(?<grpb>b)|(?<grpc>c)]"; Regex regNoCase = new Regex(regex, RegexOptions.IgnoreCase); Regex regCase = new Regex(regex); MatchCollection matchNoCase = regNoCase.Matches(test); MatchCollection matchCase = regCase.Matches(test); //Combine matchNoCase and matchCase into an IEnumerable IEnumerable<Match> combined= null; foreach (Match match in combined) { //Use the Index and (successful) Groups properties //of the match in another operation } In practice, the MatchCollections might contain thousands of results and be run frequently using long dynamically created REGEXes, so I'd like to shy away from copying the results to arrays, etc. I am still learning LINQ and am fuzzy on how to go about combining these or what the performance hits to an already sluggish process will be.

    Read the article

  • php regex expression to get title

    - by 55skidoo
    I'm trying to strip content titles out of the middle of text strings. Could I use regex to strip everything out of this string except for the title (in italics) in these strings? Or is there a better way? Joe User wrote a blog post called The 10 Best Regex Expressions in the category Regex. Jane User wrote a blog post called Regex is Hard! in the category TechProblems. I've tried to come up with a regex expression to cover this, but I think it might need two. The trick is that the text in bold is always the same, so you could search for that, like this: regex: delete everything before and including wrote a blog post called regex: delete in the category and everything after it.

    Read the article

  • Scala regex Named Capturing Groups

    - by Brent
    In scala.util.matching.Regex trait MatchData I see that there support for groupnames (Named Capturing Groups) But since Java does not support groupnames until version 7 as I understand it, Scala version 2.8.0.RC4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6. gives me this exception: scala> val pattern = """(?<login>\w+) (?<id>\d+)""".r java.util.regex.PatternSyntaxException: Look-behind group does not have an obvio us maximum length near index 11 (?<login>\w+) (?<id>\d+) ^ at java.util.regex.Pattern.error(Pattern.java:1713) at java.util.regex.Pattern.group0(Pattern.java:2488) at java.util.regex.Pattern.sequence(Pattern.java:1806) at java.util.regex.Pattern.expr(Pattern.java:1752) at java.util.regex.Pattern.compile(Pattern.java:1460) So the question is Named Capturing Groups supported in Scala? If so any examples out there? If not I might look into the Named-Regexp lib from clement.denis.

    Read the article

  • Is regex too slow? Real life examples where simple non-regex alternative is better

    - by polygenelubricants
    I've seen people here made comments like "regex is too slow!", or "why would you do something so simple using regex!" (and then present a 10+ lines alternative instead), etc. I haven't really used regex in industrial setting, so I'm curious if there are applications where regex is demonstratably just too slow, AND where a simple non-regex alternative exists that performs significantly (maybe even asymptotically!) better. Obviously many highly-specialized string manipulations with sophisticated string algorithms will outperform regex easily, but I'm talking about cases where a simple solution exists and significantly outperforms regex. What counts as simple is subjective, of course, but I think a reasonable standard is that if it uses only String, StringBuilder, etc, then it's probably simple.

    Read the article

  • Can the csv format be defined by a regex?

    - by Spencer Rathbun
    A colleague and I have recently argued over whether a pure regex is capable of fully encapsulating the csv format, such that it is capable of parsing all files with any given escape char, quote char, and separator char. The regex need not be capable of changing these chars after creation, but it must not fail on any other edge case. I have argued that this is impossible for just a tokenizer. The only regex that might be able to do this is a very complex PCRE style that moves beyond just tokenizing. I am looking for something along the lines of: ... the csv format is a context free grammar and as such, it is impossible to parse with regex alone ... Or am I wrong? Is it possible to parse csv with just a POSIX regex? For example, if both the escape char and the quote char are ", then these two lines are valid csv: """this is a test.""","" "and he said,""What will be, will be."", to which I replied, ""Surely not!""","moving on to the next field here..."

    Read the article

  • Java regex patterns - compile time constants or instance members?

    - by KepaniHaole
    Currently, I have a couple of singleton objects where I'm doing matching on regular expressions, and my Patterns are defined like so: class Foobar { private final Pattern firstPattern = Pattern.compile("some regex"); private final Pattern secondPattern = Pattern.compile("some other regex"); // more Patterns, etc. private Foobar() {} public static Foobar create() { /* singleton stuff */ } } But I was told by someone the other day that this is bad style, and Patterns should always be defined at the class level, and look something like this instead: class Foobar { private static final Pattern FIRST_PATTERN = Pattern.compile("some regex"); private static final Pattern SECOND_PATTERN = Pattern.compile("some other regex"); // more Patterns, etc. private Foobar() {} public static Foobar create() { /* singleton stuff */ } } The lifetime of this particular object isn't that long, and my main reason for using the first approach is because it doesn't make sense to me to hold on to the Patterns once the object gets GC'd. Any suggestions / thoughts?

    Read the article

  • .NET RegEx "Memory Leak" investigation

    - by Kevin Pullin
    I recently looked into some .NET "memory leaks" (i.e. unexpected, lingering GC rooted objects) in a WinForms app. After loading and then closing a huge report, the memory usage did not drop as expected even after a couple of gen2 collections. Assuming that the reporting control was being kept alive by a stray event handler I cracked open WinDbg to see what was happening... Using WinDbg, the !dumpheap -stat command reported a large amount of memory was consumed by string instances. Further refining this down with the !dumpheap -type System.String command I found the culprit, a 90MB string used for the report, at address 03be7930. The last step was to invoke !gcroot 03be7930 to see which object(s) were keeping it alive. My expectations were incorrect - it was not an unhooked event handler hanging onto the reporting control (and report string), but instead it was held on by a System.Text.RegularExpressions.RegexInterpreter instance, which itself is a descendant of a System.Text.RegularExpressions.CachedCodeEntry. Now, the caching of Regexs is (somewhat) common knowledge as this helps to reduce the overhead of having to recompile the Regex each time it is used. But what then does this have to do with keeping my string alive? Based on analysis using Reflector, it turns out that the input string is stored in the RegexInterpreter whenever a Regex method is called. The RegexInterpreter holds onto this string reference until a new string is fed into it by a subsequent Regex method invocation. I'd expect similar behaviour by hanging onto Regex.Match instances and perhaps others. The chain is something like this: Regex.Split, Regex.Match, Regex.Replace, etc Regex.Run RegexScanner.Scan (RegexScanner is the base class, RegexInterpreter is the subclass described above). The offending Regex is only used for reporting, rarely used, and therefore unlikely to be used again to clear out the existing report string. And even if the Regex was used at a later point, it would probably be processing another large report. This is a relatively significant problem and just plain feels dirty. All that said, I found a few options on how to resolve, or at least work around, this scenario. I'll let the community respond first and if no takers come forward I will fill in any gaps in a day or two.

    Read the article

  • Regex one-to-one mapping pattern replace

    - by polygenelubricants
    How would you use regex to write a function that replaces all lowercase letters with uppercase and vice versa? Note: this is NOT a homework question. See also my previous explorations of regex: Regex split into overlapping strings (Alan Moore's answer is especially instructive) Can you use zero-width matching regex in String split? (my solution exploits a known Java regex bug with regards to non-obvious length lookbehind!)

    Read the article

  • Does REGEX differ from PHP to Python

    - by daemonfire300
    hi there, I found this post: http://stackoverflow.com/questions/118143/python-regex-vs-php-regex but I actually did not get if Python's REGEX syntax matches PHP's REGEX syntax. I started to convert some of my old PHP code to python (due to g's appengine etc.), and now I would like to know whether the regex is 100% convertable, by simple copy & paste. regards,

    Read the article

  • Python regex compile (with re.VERBOSE) not working

    - by bfloriang
    I'm trying to put comments in when compiling a regex but when using the re.VERBOSE flag I get no matchresult anymore. (using Python 3.3.0) Before: regex = re.compile(r"Duke wann", re.IGNORECASE) print(regex.search("He is called: Duke WAnn.").group()) Output: Duke WAnn After: regex = re.compile(r''' Duke # First name Wann #Last Name ''', re.VERBOSE | re.IGNORECASE) print(regex.search("He is called: Duke WAnn.").group())` Output: AttributeError: 'NoneType' object has no attribute 'group'

    Read the article

  • Regex: How do I match some regex logic 1 or more times?

    - by tom
    I already have some regex logic which says to look for a div tag with class=something. However, this might occur more than once (one after another). You can't simply add square brackets around that complex regex logic already (e.g. [:some complicated regex logic already existing:]* -- so how do you do it in regex? I want to avoid having to use the programming language logic to append that regex logic after itself if I can... Thanks

    Read the article

  • installing old MySQL client libraries (libmysqlclient.so.15, libpq.so.4)

    - by Elijah Paul
    I'm attempting to install Nagios plugins on a Zimbra 8.0.2 server running CentOS 6.4, but have run into the following error when I run yum install nagios-plugins-all Error: Package: nagios-plugins-mysql-1.4.15-2.el5.x86_64 (epel) Requires: libmysqlclient.so.15()(64bit) Error: Package: nagios-plugins-pgsql-1.4.15-2.el5.x86_64 (epel) Requires: libpq.so.4()(64bit) Error: Package: nagios-plugins-mysql-1.4.15-2.el5.x86_64 (epel) Requires: libmysqlclient.so.15(libmysqlclient_15)(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest How can I install these libraries (libmysqlclient.so.15 & libpq.so.4)? Will installing these libraries possibly break Zimbra?

    Read the article

  • Error while loading shared libraries - libwebsock

    - by kittyPL
    Im trying to setup libwebsock, simple C websocket library. I followed the installation procedure from INSTALL file, everything went fine. Im able to compile test program given in the examples. But when I want to run my executable, wild error appears: ./echo: error while loading shared libraries: libwebsock.so.1: cannot open shared object file: No such file or directory I checked /usr/local/lib twice, libwebsock.so.1 exists and is doing very well. I also tried copying the lib to the echo folder (so its placed next to binary), still same error. It's quite funny for me: shadowz@Ubu:~/WebSocket$ ls echo echo.c echo.cpp libwebsock.so.1 shadowz@Ubu:~/WebSocket$ ./echo ./echo: error while loading shared libraries: libwebsock.so.1: cannot open shared object file: No such file or directory Any suggestions? Im running out of ideas...

    Read the article

  • How do you capture a group with regex?

    - by Sylvain
    Hi, I'm trying to extract a string from another using regex. I'm using the POSIX regex functions (regcomp, regexec ...), and I fail at capturing a group ... For instance, let the pattern be something as simple as "MAIL FROM:<(.*)>" (with REG_EXTENDED cflags) I want to capture everything between '<' and '' My problem is that regmatch_t gives me the boundaries of the whole pattern (MAIL FROM:<...) instead of just what's between the parenthesis ... What am I missing ? Thanks in advance, edit: some code #define SENDER_REGEX "MAIL FROM:<(.*)>" int main(int ac, char **av) { regex_t regex; int status; regmatch_t pmatch[1]; if (regcomp(&regex, SENDER_REGEX, REG_ICASE|REG_EXTENDED) != 0) printf("regcomp error\n"); status = regexec(&regex, av[1], 1, pmatch, 0); regfree(&regex); if (!status) printf( "matched from %d (%c) to %d (%c)\n" , pmatch[0].rm_so , av[1][pmatch[0].rm_so] , pmatch[0].rm_eo , av[1][pmatch[0].rm_eo] ); return (0); } outputs: $./a.out "012345MAIL FROM:<abcd>$" matched from 6 (M) to 22 ($) solution: as RarrRarrRarr said, the indices are indeed in pmatch[1].rm_so and pmatch[1].rm_eo hence regmatch_t pmatch[1]; becomes regmatch_t pmatch[2]; and regexec(&regex, av[1], 1, pmatch, 0); becomes regexec(&regex, av[1], 2, pmatch, 0); Thanks :)

    Read the article

  • Uninstall libgl? Program using libgl instead of Nvidia's OpenGL libraries

    - by Tek
    I'm running Ubuntu 12.10 64-bit. I'm trying to get valve's new Linux Steam client running, but having a bit of trouble getting it to detect the right libraries or at least I think that's the issue. I installed the latest 310.19 Nvidia proprietary drivers from geforce.com. Here's the screenshot: I tried uninstalling xserver-xorg-video-nouveau thinking this was the problem but I'm still getting the same error. Any ideas what I can do for Steam to detect the right Nvidia OpenGL libraries?

    Read the article

  • libstdc++ - compiling failing because of tr1/regex

    - by Radek Šimko
    I have these packages installed on my OpenSUSE 11.3: i | libstdc++45 | Standard shared library for C++ | package i | libstdc++45-devel | Contains files and libraries for development | package But when i'm trying to compile this C++ code: #include <stdio.h> #include <tr1/regex> using namespace std; int main() { int test[2]; const tr1::regex pattern(".*"); test[0] = 1; if (tr1::regex_match("anything", pattern) == false) { printf("Pattern does not match.\n"); } return 0; } using g++ -pedantic -g -O1 -o ./main.o ./main.cpp It outputs this errors: ./main.cpp: In function ‘int main()’: ./main.cpp:13:43: error: ‘printf’ was not declared in this scope radek@mypc:~> nano main.cpp radek@mypc:~> g++ -pedantic -g -O1 -o ./main.o ./main.cpp /tmp/cc0g3GUE.o: In function `basic_regex': /usr/include/c++/4.5/tr1_impl/regex:771: undefined reference to `std::tr1::basic_regex<char, std::tr1::regex_traits<char> >::_M_compile()' /tmp/cc0g3GUE.o: In function `bool std::tr1::regex_match<char const*, char, std::tr1::regex_traits<char> >(char const*, char const*, std::tr1::basic_regex<char, std::tr1::regex_traits<char> > const&, std::bitset<11u>)': /usr/include/c++/4.5/tr1_impl/regex:2144: undefined reference to `bool std::tr1::regex_match<char const*, std::allocator<std::tr1::sub_match<char const*> >, char, std::tr1::regex_traits<char> >(char const*, char const*, std::tr1::match_results<char const*, std::allocator<std::tr1::sub_match<char const*> > >&, std::tr1::basic_regex<char, std::tr1::regex_traits<char> > const&, std::bitset<11u>)' collect2: ld returned 1 exit status What packages should i (un)install to make the code work on my PC?

    Read the article

  • How to keep your third party libraries up to date?

    - by Joonas Pulakka
    Let's say that I have a project that depends on 10 libraries, and within my project's trunk I'm free to use any versions of those libraries. So I start with the most recent versions. Then, each of those libraries gets an update once a month (on average). Now, keeping my trunk completely up to date would require updating a library reference every three days. This is obviously too much. Even though usually version 1.2.3 is a drop-in replacement for version 1.2.2, you never know without testing. Unit tests aren't enough; if it's a DB / file engine, you have to ensure that it works properly with files that were created with older versions, and maybe vice versa. If it has something to do with GUI, you have to visually inspect everything. And so on. How do you handle this? Some possible approaches: If it ain't broke, don't fix it. Stay with your current version of the library as long as you don't notice anything wrong with it when used in your application, no matter how often the library vendor publishes updates. Small incremental changes are just waste. Update frequently in order to keep change small. Since you'll have to update some day in any case, it's better to update often so that you notice any problems early when they're easy to fix, instead of jumping over several versions and letting potential problems to accumulate. Something in between. Is there a sweet spot?

    Read the article

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