Search Results

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

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

  • inotifywait usage and exclude

    - by user58542
    I want to monitor special path to any event of create or modified files recursively in it via inotifywait but i cant know what's problem. i have some folder that i want to exclude thame. watchpath -> folder1 -> file1 -> ingnorefile1 [IG] -> ignorefolder1 [IG] i have problem to exclude them. inotifywait -mr --exclude '(ignorefolder1|folder1\/ingnorefile1)' -e modify -e create -e delete . | while read date time dir file; do what is correct regular expression ?

    Read the article

  • Regular expression from font to span (size and colour) and back (VB.NET)

    - by chapmanio
    Hi, I am looking for a regular expression that can convert my font tags (only with size and colour attributes) into span tags with the relevant inline css. This will be done in VB.NET if that helps at all. I also need a regular expression to go the other way as well. To elaborate below is an example of the conversion I am looking for: <font size="10">some text</font> To then become: <span style="font-size:10px;">some text</span> So converting the tag and putting a "px" at the end of whatever the font size is (I don't need to change/convert the font size, just stick px at the end). The regular expression needs to cope with a font tag that only has a size attribute, only a color attribute, or both: <font size="10">some text</font> <font color="#000000">some text</font> <font size="10" color="#000000">some text</font> <font color="#000000" size="10">some text</font> I also need another regular expression to do the opposite conversion. So for example: <span style="font-size:10px;">some text</span> Will become: <font size="10">some text</font> As before converting the tag but this time removing the "px", I don't need to worry about changing the font size. Again this will also need to cope with the size styling, font styling, and a combination of both: <span style="font-size:10px;">some text</span> <span style="color:#000000;">some text</span> <span style="font-size:10px; color:#000000;">some text</span> <span style="color:#000000; font-size:10px;">some text</span> I apprecitate this is a lot to ask, I am hopeless with regular expressions and need to find a way of making these conversions in my code. Thanks so much to anyone that can/is willing to help me!

    Read the article

  • Win7 - Opening "Programs and Features" as Admin from command line (logged in as regular user)

    - by user1741264
    We have Win7 machines on a domain that we'd like to open the "Programs and Features" control applet via the command line while a regular user is logged in. Heres the catch: I know how to do this using runas from command line BUT after "Programs and Features" opens, I dont truly have the ability to remove a program. I am told that I need to be an Admin to do so. Here are the commands I have tried: runas /user:%computername%\administrator cmd.exe then in the new cmd window running: control appwiz.cpl runas /user:%companydomain%\%domainadminacct% cmd.exe then in the new cmd window running: control appwiz.cpl runas /user:%computername%\administrator cmd.exe then in the new cmd window running: rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl runas /user:%companydomain%\%domainadminacct% cmd.exe then in the new cmd window running: rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl I have also tried all of the above as one long line of code instead of launching a cmd.exe as Admin As you can see, I have tried running the command using both a local admin account (Administrator) AND a domain admin account. I have alos tried launching the runas command as one long command (opening the "programs and features") AND 1st launching a cmd.exe with admin rights and THEN launching the "Prgrams and Features" window. The result is the same: The "Programs and Features" windows opens but when I try to perform an uninstall, I am told I need Admin rights. Thus I am lead to believe that this instance of "Programs and Features" is not truly being run as an admin I am trying to avoid logging the regular user out. I am also aware that every program has its own uninstaller, I do not want to uninstall that way. I want to use the uninstaller in "Programs and Features". Any help is appreciated.

    Read the article

  • Regular Expression for "AND"?

    - by Kevin
    Let's say I gave you the following text: allow_httpd_anon_write --> off allow_httpd_mod_auth_ntlm_winbind --> off allow_httpd_mod_auth_pam --> off allow_httpd_sys_script_anon_write --> off httpd_builtin_scripting --> on httpd_can_check_spam --> off httpd_can_network_connect --> off httpd_can_network_connect_cobbler --> off httpd_can_network_connect_db --> off httpd_can_network_memcache --> off httpd_can_network_relay --> off httpd_can_sendmail --> off httpd_dbus_avahi --> on httpd_enable_cgi --> on httpd_enable_ftp_server --> off httpd_enable_homedirs --> on httpd_execmem --> off httpd_read_user_content --> off httpd_setrlimit --> off httpd_ssi_exec --> off httpd_tmp_exec --> off httpd_tty_comm --> on httpd_unified --> on httpd_use_cifs --> off httpd_use_gpg --> off httpd_use_nfs --> off What I want to do is create a regular expression that can parse text like this looking for two or more words on the same line. For example, if I was looking for a SELinux boolean that covered "ftp" AND "home" on the same line, I would currently do the following: getsebool -a | grep -i ftp | grep -i home However, I am looking for a regular expression that does the same thing. Specifically, find all of the words in any order on a line...

    Read the article

  • Lua pattern matching vs. regular expressions

    - by harald
    hello, i'm currently learning lua. regarding pattern-matching in lua i found the following sentence in the lua documentation on lua.org: Nevertheless, pattern matching in Lua is a powerful tool and includes some features that are difficult to match with standard POSIX implementations. as i'm familiar with posix regular expressions i would like to know if there are any common samples where lua pattern matching is "better" compared to regular expression -- or did i misinterpret the sentence? and if there are any common examples: why is any of pattern-matching vs. regular expressions better suited? thanks very much, harald

    Read the article

  • how to prevent white spaces in a regular expression regex validation

    - by Rees
    i am completely new to regular expressions and am trying to create a regular expression in flex for a validation. using a regular expression, i am going to validate that the user input does NOT contain any white-space and consists of only characters and digits... starting with digit. so far i have: expression="[A-Za-z][A-Za-z0-9]*" this correctly checks for user input to start with a character followed by a possible digit, but this does not check if there is white space...(in my tests if user input has a space this input will pass through validation - this is not desired) can someone tell me how i can modify this expression to ensure that user input with whitespace is flagged as invalid?

    Read the article

  • regular expression search in python

    - by Richard
    Hello all, I am trying to parse some data and just started reading up on regular Expressions so I am pretty new to it. This is the code I have so far String = "MEASUREMENT 3835 303 Oxygen: 235.78 Saturation: 90.51 Temperature: 24.41 DPhase: 33.07 BPhase: 29.56 RPhase: 0.00 BAmp: 368.57 BPot: 18.00 RAmp: 0.00 RawTem.: 68.21" String = String.strip('\t\x11\x13') String = String.split("Oxygen:") print String[1] String[1].lstrip print String[1] What I am trying to do is to do is remove the oxygen data (235.78) and put it in its own variable using an regular expression search. I realize that there should be an easy solution but I am trying to figure out how regular expressions work and they are making my head hurt. Thanks for any help Richard

    Read the article

  • Regular expression only for website

    - by Katie
    HI, I'm new to Regular Expression. I need to find just website in some text and I'm looking for a regular expression able to find out strings like: www.my.home, http://my.site.it But this regular expression should not find strings like: [email protected] or if the website is already inside html tag <a href="http://www.my.site.com/"><span style="font-style: normal;">www.mambo-test.org</span></a> I tried with this one: \b((https?://[^ ])|(www.[^ ])) but it also finds the website in the href and between the tag: <a href="http://www.my.site.com/"><span style="font-style: normal;">www.mambo-test.org</span></a> and I don't know how except this case.

    Read the article

  • Regular Expression for exclude something that has specific word inside bracked (MySQL)

    - by bn
    This Regular expression if for MySQL query: I want to exclude this row because it has 'something' in side the bracket "bla bla bla bla bla bla (bla bla bla something)" However I want to include this row, because it does not have 'something' inside the bracket "bla bla bla (bla bla bla)" I tried this query but it didnt work. SELECT * FROM table WHERE field NOT REGEXP '((%something%))'; I think this is wrong, I just did trial and error, I like to use regular expression, but never understand it completely. is there any good tutorial/books/links for learning the detail of regular expression? Thank You

    Read the article

  • Airport Extreme and Windows PC via regular LAN (not WIFI)

    - by Mr AJL
    So I got an airpoort extreme, and everything works beautifully on the mac, but my windows 7 PC which is connected via a regular ethernet cable can't see any network. The Win7 PC says there's no cable connected. Any ideas? Is there some kind of setting you have to enable with the Airport utility? I looked everywhere but can't find anything. Thanks!

    Read the article

  • Notepad++ Search & Replace with Regular Expressions

    - by Jeremy
    I know its simple, but I can't get it to work... I have a strings like {span style="display:none"}123{/span} and {span style="display:none"}456{/span} and {span style="display:none"}789{/span} in a file. I want to remove all of these string. So, I thought a simple regular expression replace in NotePad++ should be like "{span style="display:none"}[(.)]{/span}" - but, this is not working. Thank for your help!

    Read the article

  • Notepad++ Search & Replace with Regular Expressions

    - by Jeremy
    I know its simple, but I can't get it to work... I have a strings like {span style="display:none"}123{/span} and {span style="display:none"}456{/span} and {span style="display:none"}789{/span} in a file. I want to remove all of these string. So, I thought a simple regular expression replace in NotePad++ should be like {span style="display:none"}[(.)]{/span} but, this is not working. Thank for your help!

    Read the article

  • Java Counting # of occurrences of a word in a string

    - by Doug
    I have a large text file I am reading from and I need to find out how many times some words come up. For example, the word "the". I'm doing this line by line each line is a string. I need to make sure that I only count legit "the"'s the the in other would not count. This means I know I need to use regular expressions in some way. What I was trying so far is this: numSpace += line.split("[^a-z]the[^a-z]").length; I realize the regular expression may not be correct at the moment but I tried without that and just tried to find occurrences of the word the and I get wrong numbers to. I was under the impression this would split the string up into an array and how many times that array was split up was how many times the word is in the string. Any ideas I would be grateful.

    Read the article

  • Varnish VCL - Regular Expression Evaluation

    - by Hugues ALARY
    I have been struggling for the past few days with this problem: Basically, I want to send to a client browser a cookie of the form foo[sha1oftheurl]=[randomvalue] if and only if the cookie has not already been set. e.g. If a client browser requests "/page.html", the HTTP response will be like: resp.http.Set-Cookie = "foo4c9ae249e9e061dd6e30893e03dc10a58cc40ee6=ABCD;" then, if the same client request "/index.html", the HTTP response will contain a header: resp.http.Set-Cookie = "foo14fe4559026d4c5b5eb530ee70300c52d99e70d7=QWERTY;" In the end, the client browser will have 2 cookies: foo4c9ae249e9e061dd6e30893e03dc10a58cc40ee6=ABCD foo14fe4559026d4c5b5eb530ee70300c52d99e70d7=QWERTY Now, that, is not complicated in itself. The following code does it: import digest; import random; ##This vmod does not exist, it's just for the example. sub vcl_recv() { ## We compute the sha1 of the requested URL and store it in req.http.Url-Sha1 set req.http.Url-Sha1 = digest.hash_sha1(req.url); set req.http.random-value = random.get_rand(); } sub vcl_deliver() { ## We create a cookie on the client browser by creating a "Set-Cookie" header ## In our case the cookie we create is of the form foo[sha1]=[randomvalue] ## e.g for a URL "/page.html" the cookie will be foo4c9ae249e9e061dd6e30893e03dc10a58cc40ee6=[randomvalue] set resp.http.Set-Cookie = {""} + resp.http.Set-Cookie + "foo"+req.http.Url-Sha1+"="+req.http.random-value; } However, this code does not take into account the case where the Cookie already exists. I need to check that the Cookie does not exists before generating a random value. So I thought about this code: import digest; import random; sub vcl_recv() { ## We compute the sha1 of the requested URL and store it in req.http.Url-Sha1 set req.http.Url-Sha1 = digest.hash_sha1(req.url); set req.http.random-value = random.get_rand(); set req.http.regex = "abtest"+req.http.Url-Sha1; if(!req.http.Cookie ~ req.http.regex) { set req.http.random-value = random.get_rand(); } } The problem is that Varnish does not compute Regular expression at run time. Which leads to this error when I try to compile: Message from VCC-compiler: Expected CSTR got 'req.http.regex' (program line 940), at ('input' Line 42 Pos 31) if(req.http.Cookie !~ req.http.regex) { ------------------------------##############--- Running VCC-compiler failed, exit 1 VCL compilation failed One could propose to solve my problem by matching on the "abtest" part of the cookie or even "abtest[a-fA-F0-9]{40}": if(!req.http.Cookie ~ "abtest[a-fA-F0-9]{40}") { set req.http.random-value = random.get_rand(); } But this code matches any cookie starting by 'abtest' and containing an hexadecimal string of 40 characters. Which means that if a client requests "/page.html" first, then "/index.html", the condition will evaluate to true even if the cookie for the "/index.html" has not been set. I found in bug report phk or someone else stating that computing regular expressions was extremely expensive which is why they are evaluated during compilation. Considering this, I believe that there is no way of achieving what I want the way I've been trying to. Is there any way of solving this problem, other than writting a vmod? Thanks for your help! -Hugues

    Read the article

  • regular expression to find all cell addresses in string

    - by Nike
    I have a string which may contain cell address, which is look like: A1, B34, Z728 - only capital letters and AA3, ABA92, ZABC83 - there may be several letters before Integer number. The typical source string is look like: =3+7*A1-B3*AB28 I need to get collection of all cells in the string: A1, B3, AB28 I tried to use Regex.Matches method with the following regular expression: @"[A..Z]+?[1..9]+?", but it doesn't work. Can anybody help me to write the regular expression?

    Read the article

  • NSPredicate and simple Regular Expression problem

    - by rjstelling
    I'm having problems with simple NSPredicates and regular expressions: NSString *mystring = @"file://questions/123456789/desc-text-here"; NSString *regex = @"file://questions+"; NSPredicate *regextest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex]; BOOL isMatch = [regextest evaluateWithObject:mystring]; In the above example isMatch is is always false/NO. What am I missing? I can't seem to find a regular expression that will match file://questions.

    Read the article

  • Conditional CSS file doesn't override regular CSS

    - by dmr
    I am using conditional comments to link to a css file (let's call it "IEonly.css") if the IE version is less than 8. I am trying to override some properties in the regular css file. Strangely enough, IEonly.css will set new css properties correctly, but it won't override the properties in the regular CSS file! (I am trying to make this work for IE7). Help!

    Read the article

  • PHP regular expression find and append to string

    - by Gary
    I'm trying to use regular expressions (preg_match and preg_replace) to do the following: Find a string like this: {%title=append me to the title%} Then extract out the title part and the append me to the title part. Which I can then use to perform a str_replace(), etc. Given that I'm terrible at regular expressions, my code is failing... preg_match('/\{\%title\=(\w+.)\%\}/', $string, $matches); What pattern do I need? :/

    Read the article

  • Regular Expression With Mask

    - by Kumar
    I have a regular expression for phone numbers as follows: ^[01]?[- .]?(\([2-9]\d{2}\)|[2-9]\d{2})[- .]?\d{3}[- .]?\d{4}$ I have a mask on the phone number textbox in the following format: (___)___-____ How can I modify the regular expression so that it accommodates the mask?

    Read the article

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