regexp help - match on two backslashes

Ask a Question related to PERL Miscellaneous, Design and Development.

  1. #1

    Default regexp help - match on two backslashes

    Hello,

    Apologies if this is the wrong place to post this question...

    What regular expression can I use to match two backslashes?

    I am actually using grep (on a windows machine), and I have tried
    every combination of escaped backslashes I can think of...

    Thanks for the help

    Daniel Ems
    Daniel Ems Guest

  2. Similar Questions and Discussions

    1. #38579 [Asn->Csd]: require_once() distinguishes backslashes from forward slashes
      ID: 38579 Updated by: dmitry@php.net Reported By: frank at procurios dot nl -Status: Assigned +Status: ...
    2. backslashes in queries containing LIKE
      Hi, We have a problem with backslashes in queries containing LIKE. insert into table (field) values ('IM\\test') select * from table where...
    3. How do I RegExp Match a ? without using \X{3F}?
      Is there a way to match a question mark using a regular expression without looking for a \X{3F} ? Thanks in advance, -Dan
    4. PHPMyAdmin adding backslashes
      Hi, I've recently started looking at PHP and MY SQL within Dreamweaver MX. I'm usin PHPMyAdmin and put some example code from my tutorial book...
    5. [windows 9*] how to get the output of commands which contain backslashes?
      Hi I have to deal with the annoying shell of Windows. Some stuff works OK via SHELL = if CONFIG =~ /win/ # more stuff based on...
  3. #2

    Default Re: regexp help - match on two backslashes

    [email]danielems@myfastmail.com[/email] (Daniel Ems) writes:
    > Hello,
    >
    > Apologies if this is the wrong place to post this question...
    >
    > What regular expression can I use to match two backslashes?
    /\Q\\/

    perldoc -f quotemeta

    --
    perl -e '$;=q,BllpZllla_nNanfc]^h_rpF,;@;=split//,
    $;;$^R.=--$=*ord for split//,$~;sub _{for(1..4){$=
    =shift;$=--if$=!=4;while($=){print chr(ord($;[$%])
    +shift);$%++;$=--;}print " ";}}_(split//,$^R);q;;'
    Ryan Shondell Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139