Finally I dont understand how to compound regular expressions, help please

I have read a lot of information about it, but .... I still do not understand how to make compound expresions ....
How must I use [ ] ?
Please three examples :
I want to search :
- any character but nothing of "abcd"
- any character but no 'dot' at any position
- any character but no 'dot' at position 4
Any good tutorial ?
Thank you

The way you have used the word 'search' create some uncertainty in my mind as to what you are asking for. I suspect that what you really want is a 'true' or 'false' that a given string matches some pattern. There are other ways to do this but ...
"any character but nothing of "abcd" " then use Matcher.matches() using regex "[^abcd]*" .
"any character but no 'dot' at any position" then Matcher.matches() using regex "[^.]*" .
"any character but no 'dot' at position 4" then Matcher.matches() using regex "(?!.{3}\\.)" .
Edited by: sabre150 on Aug 5, 2010 8:50 AM
Sodding forum markup!

Similar Messages

  • Regular Expression Help Please?

    Hi
    I'm trying to get my head round regular expressions in find
    and replace,
    it's a slow process for me!
    I have this -
    <a
    href="
    http://www.forms.mydomainname.com/cgi-bin/urltracker/tracker.pl?site=http://www.website-ad dress.com"
    and I'm trying to change it to this -
    <a
    href="
    http://www.forms.mydomainname.com/cgi-bin/urltracker/tracker.pl?site=http://www.website-ad dress.com&email="
    I was trying first of all with a *.*, but couldn't work out
    how to tell it
    where the code ends?
    They are hundred of pages like this, all with different
    website-addresses.
    After I have changed all the pages to the new code, I then
    will need to copy
    and paste an different email address to the end of each line,
    to each page.
    Unless anyone knows a way of automating that?
    Hope someone can point me in the right direction?
    Many thanks, Craig.

    Hi David
    Many thanks for all that and the detailed descriptions.
    I will be working through it all again tomorrow, so will put
    your info to
    the test! lol
    As for partially building the email addresses, I think that
    would be too
    much,
    as the emails are all over the place, some have their own
    domain, other use
    hotmail, Yahoo etc.
    Some even have they own domain for their website and a free
    one for the
    email address.
    They are all Hotels, B&B' & Cottages etc.
    Hopefully all your hard work will help me a step closer to
    understanding it
    all.
    Many thanks again,
    Craig.
    "David Stiller" <[email protected]> wrote in
    message
    news:[email protected]...
    > Craig,
    >
    >> You do have that correct David, thanks.
    >
    > Okay.
    Regex is as much an "exact science" as it is an "art
    > form" -- which isn't to say I'm a regex artist; I just
    love the
    > technology -- but I mention this because I made the
    following assumption
    > in order to keep the pattern relatively simple: your
    href values are all
    > quoted in either single or double quotes. Such as, for
    example, the
    > following sample HTML ...
    >
    > <body>
    > <a
    > href="
    http://www.forms.mydomainname.com/cgi-bin/urltracker/tracker.pl?site=www.sample.com">asfd< /a>
    > <a
    > href='
    http://www.forms.mydomainname.com/cgi-bin/urltracker/tracker.pl?site=www.example.net'></a>
    > <a
    > href="
    http://www.forms.mydomainname.com/cgi-bin/urltracker/tracker.pl?site=www.company.com"></a>
    > </body>
    >
    > In the Find field, enter this pattern ...
    >
    > (tracker\.pl\?site=.*?)(["'])
    >
    > ... and in the Replace field, enter this pattern ...
    >
    > $1&email=ADDRESS$2
    >
    > Then carefully use your Find Next and Replace buttons to
    step through
    > your code. The above will add &email=ADDRESS to your
    HTML in all the
    > right places. I chose that because ADDRESS is easy to
    select by double
    > clicking, which should facilitate your replacing it.
    >
    >
    > Let's step through the patterns.
    >
    > (tracker\.pl\?site=[^"']*?)(["'])
    >
    > This looks for the phrase "tracker.pl?site=" (without
    quotes) followed
    > immediately by a "non-greedy" match of any character
    that isn't a single
    > or double quotation mark, followed immediately by either
    a single or
    > double quotation mark. I took , which I took to be a
    safe, short "hook"
    > into the string we need. I split this pattern into two
    sections, grouped
    > by parentheses. This allows us to refer to the first
    part of the match
    > (everything but the closing quotation mark) as group 1,
    and the second
    > part (the closing quotatin mark) as group 2. This is
    like storying values
    > with your calculator's M (memory) button.
    >
    > $1&email=ADDRESS$2
    >
    > Here, we refer to group 1 and follow it with the phrase
    > "&email=ADDRESS" (without quotes), followed again by
    group 2.
    >
    > Now, in theory, we could use the domain name of each
    unique site to at
    > least partially build the email address. That would get
    you even closer
    > to your goal. To do so, I'd need even more detail from
    you, such as the
    > kinds of domains you have (how many sub domains are
    probable, etc.).
    >
    >
    > David
    > stiller (at) quip (dot) net
    > Dev essays:
    http://www.quip.net/blog/
    > "Luck is the residue of good design."
    >

  • Regular expression help please. (extractin​g a string subset between two markers)

    I haven't used regular expressions before, and I'm having trouble finding a regular expression to extract a string subset between two markers.
    The string;
    Header stuff I don't want
    Header stuff I don't want
    Header stuff I don't want
    Header stuff I don't want
    Header stuff I don't want
    Header stuff I don't want
    ERRORS 6
    Info I want line 1
    Info I want line 2
    Info I want line 3
    Info I want line 4
    Info I want line 5
    Info I want line 6
    END_ERRORS
    From the string above (this is read from a text file) I'm trying to extract the string subset between ERRORS 6 and END_ERRORS. The number of errors (6 in this case) can be any number 1 through 32, and the number of lines I want to extract will correspond with this number. I can supply this number from a calling VI if necessary.
    My current solution, which works but is not very elegant;
    (1) uses Match Regular Expression to the return the string after matching ERRORS 6
    (2) uses Match Regular Expression returning all characters before match END_ERRORS of the string returned by (1)
    Is there a way this can be accomplished using 1 Match Regular Expression? If so could anyone suggest how, together with an explanation of how the regular expression given works.
    Many thanks
    Alan
    Solved!
    Go to Solution.

    I used a character class to catch any word or whitespace characters.  Putting this inside parentheses makes a submatch that you can get by expanding the Match Regular Expression node.  The \d finds digits and the two *s repeat the previous term.  So, \d* will find the '6', as well as '123456'.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • I just dont understand how to work photo shop HELP ME

    my mom bought this for me and im reading the directions and trying to figure out how it works i just dont get it at all!!! i dont know why, im good at using computers i just nvr grasped the concept of how to work this
    if you have a helpful hint please comment  thank you

    Adobe TV has a whole selection of free videos that should help you to get started.
    http://tv.adobe.com/show/learn-photoshop-elements-8/
    You can also find lots of videos using Google...
    http://www.google.com/search?hl=en&client=opera&hs=6js&rls=en&q=Photoshop%20Elements%208&u m=1&ie=UTF-8&tbo=u&tbs=vid:1&source=og&sa=N&tab=wv
    or YouTube
    http://www.youtube.com/watch?v=F1ZEEPNaqQ0
    If you just search for Photoshop Elements (without limiting it to Photoshop Elements 8 as I did) you will get even more results...most if not all things should work in version 8. (Version 8 user interface will look different and may have additonal features as each version gets new goodies.)

  • Every time i try to update my iPhone 4 to iSO5 it keeps saying my network has timed out! i dont know how to fix it! help please!

    im connected to my network 100%! my brother updated his iphone with no problem with a pc and he has the same network. i dont really know how to fix this .

    This is asked and answered many times each day.  The forum search abr is on the right side of this page.
    Disable your firewall/security software and try again.

  • I updated my phone and it has deleted the factory apps off of it and i dont know how to get them back help please

    i updated my phone and it deleted everything even the factory apps how do i get them back

    Default apps are part of the iOS and cannot be deleted.  Search all home screens and all folders and/or search for it with Spotlight, that will tell you what folder it's in.
    Also check Settings > General > Restrictions to see if it has been restricted.
    If not found, Settings > General > Reset > Reset Home Screen Layout.

  • I dont understand how to get my purchased music to download or sync to my HP computer. Can someone help me?

    Help please? I dont understand how to get my purchased music to download or sync to my HP computer.

    Hey CrystalKean,
    Thanks for the question. If you have purchased content on your iPhone that has not yet been transferred to your computer, see the following article:
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    http://support.apple.com/kb/HT1848
    Alternatively, you can download previous purchases from the iTunes Store with the steps outlined in this article:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    http://support.apple.com/kb/HT2519
    Thanks,
    Matt M.

  • Iam trying  to  upgrade  my  ipod  i  dont  understand  how  to  do  it

    iam  trying  to  upgrade  my  ipod  but  i  dont  understand  how  to  do it

    You can do it by going to settings, general, software update. Or you can connect it to iTunes and it should prompt you to update.

  • I went to put music on my itunes from my ipod and it deleted most of my music off of it and i dont know how to get it back. PLEASE HELP ME. :-|

    i went to put music on my itunes from my ipod and it deleted most of my music off of it and i dont know how to get it back. PLEASE HELP ME. :-|     

    - Unsync/delete all music and resync
    To delete all music go to Settings>General>Usage>Storage>Music>Tap edit in upper right and then tap the minus sign by All Music
    - Reset all settings                            
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes      
      - Restore to factory settings/new iOS device.                       
    If necessary, you can redownload most iTunes purchases by:        
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I have lost my ipod touch 4g 32gb i have the serial number and i dont know how to find ? plz help

    i have lost my ipod touch 4g 32gb i have the serial number and i dont know how to find ? plz help plz plz plz plz email me if you want the serial key my email is [email protected]

    Unless you had already set up
    Apple - iPod touch - How to set up Find My iPod touch
    there is nospecial way to locate your iPod,  Apple will not help.  Your SN is only good for identifying the iPod as yours if it is found.
    Change the passwoard for all accounts used onthe iPod and report it to the police. Also see:
    Reporting a lost or stolen Apple product

  • I have a 2007 macbook and today the screen went all pixelated and i dont know how to fix it any help would be nice

    i have a 2007 macbook and today the screen went all pixelated and i dont know how to fix it any help would be nice

    Boot from your installer disc. If the problem is still present, then take it in for service.

  • I dont know how to make a partition help!

    I dont know how to make a partition help!

    Open Boot Camp Assistant, print the directions, read them carefully.
    Backup your Mac before you do anything.

  • How to write regular expression to find desired string piece *duplicate*

    Hi All,
    Suppose that i have following string piece:
    name:ali#lastname:kemal#name:mehmet#lastname:cemalI need
    ali
    mehmetI use following statement
    SQL> select lst, regexp_replace(lst,'(name:)(.*)(lastname)(.*)','\2',1,1) nm from (
      2    select 'name:ali#lastname:kemal#name:mehmet#lastname:cemal' as lst from dual
      3  );
    LST                                                NM
    name:ali#lastname:kemal#name:mehmet#lastname:cemal ali#lastname:kemal#name:mehmet#
    SQL> But it does not return names correctly. When i change 5th parameter(occurence) of regexp_replace built-in function(e.g. 1,2), i may get ali and mehmet respectiveley.
    Any ideas about regexp?
    Note : I can use PL/SQL instr/substr for this manner; but i do not want to use them. I need regexp.
    Regards...
    Mennan
    Edited by: mennan on Jul 4, 2010 9:53 PM
    thread was posted twice due to chrome refresfment. Please ignore the thread and reply to How to write regular expression to find desired string piece

    The approach is to do cartesian join to a 'number' table returning number of records equal to number of names in the string.I have hardcoded 2 but you can use regexp_count to get the number of occurrences of the pattern in the string and then use level <=regexp_count(..... .
    See below for the approach
    with cte as(
    select
    'name:ali#lastname:kemal#name:mehmet#lastname:cemal' col ,level lev
    from dual connect by level <=2)
    select substr(regexp_substr('#'||col,'#name:\w+',1,lev),7)
    from cte
    /

  • Regular Expression help required

    {color:#000000}Hi....
    I am having a product table in oracle with products like CZS20T and CZSS30T and so on....
    But for printing on the invoice we need only the product name without the micron thickness like CZS and CZSS{color}{color:#000000}
    I tried regular expression with....."select regexp_substr('CZSS20T','([[:digit:]]{2})') from dual"
    {color}
    and the result was "20"*...*
    But I cant figure out how to use regular expression to get only the product name.
    Maybe there is another way without using Regular exp...
    Please help....

    regexp_substr (prod, '[[:alpha:]]*')and an example:
    SQL> with x as
      2  ( select 'CZS20T' prod from dual union all
      3    select 'CZSS30T' from dual union all
      4    select 'A10CSD' from dual
      5  )
      6  select prod
      7       , regexp_substr (prod, '[[:alpha:]]*')
      8    from x
      9  ; 
    PROD    REGEXP_SUBSTR(PROD,'[[:ALPHA
    CZS20T  CZS
    CZSS30T CZSS
    A10CSD  A
    SQL> Edited by: Alex Nuijten on Jan 27, 2009 8:52 AM

  • I used utilities to source my 10.6 snow leopard install disc to my main hardrive, and now when I turn on my computer the apple with the spinning wheel stays on the screen and stuck like that. How do I fix it Help please. I already tried all the commands

    I used utilities to source my 10.6 snow leopard install disc to my main hardrive, and now when I turn on my computer the apple with the spinning wheel stays on the screen and stuck like that. How do I fix it Help please. I already tried all the commands such as Command R, Holding down the Option key, C and holding down shift at the start up but nothing happens.
    initialy All I was trying to do was downgrade 10.7 to 10.6 .

    You have to consider the possibility the hard drive may be dying.    If your data isn't backed up, try one of the tools below:
    https://discussions.apple.com/docs/DOC-1689
    Once you are sure your data is backed up, we can examine other possibilities.  In the meantime call AppleCare for your original installation DVDs.  You may need them.

Maybe you are looking for

  • Links will not display in new window

    I have just install the new version of Thunderbird 31.4.0 and now find when I click on a Link it does not display in a new window. To display the link I have to click on the Explorer tab near the start button. I would like the link to open immediatel

  • System Preferences Mystery

    Hello I would like to pass this little bit of info on regarding the Sys Preferences. Last night when trying to open system preferences from the apple logo in the top left corner It would not open. 1.. I did a repair permissions 2.. I did a log out an

  • Avi file duration not complete

    Hi, I've edited a media on FCP 7 and send it to Compressor to encode it as an AVI.I'm natively compressing the media using DV-PAL compression setting.At the inspector window, I've set the extension as AVI.The AVI option parameters are changed as foll

  • MPN number wrongly picking in PO

    Hi  All, In my case I have configured MPN numbers for one of  my material and assigned manufacturer profile to  it. In MP01  tcode  two MPN number exists the 1st one is  not in use  means it  is   set for  deletion and the second onw is  valid  one.

  • Is it possible to create an inbound delivery for STO in a 2 step process ?

    Hi Experts, Is it possible to create an inbound delivery for STO in general (how do I get a vendor for a Plant. I have already assigned a plant to my vendor in vendor master - additional purchasing data, but it does not seem to work). In particular i