What  is regular expression search function

hi
what is use CHARTOROWID ,COMPOSE fuction in oracle

http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions025.htm#SQLRF00615
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/functions032.htm#SQLRF00618

Similar Messages

  • What happened to the search function on ipads?

    what happened to the search function on ipads?

    Ok, I agree it USED TO WORK that way, swiping down from the center. Now swiping down from the center with the newest CRAP iOS 7.0.4, all that happens is the notifications tab pulls down.
    I can see all the options for Spotlight Search in the General Setup, and have all of the search options enabled, but the old way (2 weeks ago) of getting the search pane DOESN'T WORK ANYMORE.
    Anyone have a clue where it went, or how to get it back, or enable it, or anything?  SIRI is clueless too. I say "Open Spotlight Search". She says "You don't seem to have an app named Spotlight Search"
    I can tell SIRI to open one of my 150+ apps WHEN ONLINE, but if I'm flying or out of wi-fi, and want to search my iPad, I need the spotlight search pane!!!

  • Regular Expression Search in Forms Builder

    Hi everyone, can anyone help me out?
    I'm working on a legacy forms migration project (3 to 10g) where item references often do not include the block name.
    eg.
    :stock_level := :default_level;
    instead of
    :stk.stock_level := :ctrl.default_level;
    There are also instances of set_item_property('stock_level',....)
    In complex multi-block forms this obviously makes the form difficult to understand.
    Is there a way in which I can search the triggers and program units of a form for items that don't have a block prefix? The Forms search and replace function has a Regular Expression feature, but I have no experience in this area.
    I assume I'm looking for something like this:- ":", followed by a character string that doesn't contain a "." or "="
    Thanks

    You might have a look at the commercial product formsAPIMaster, it has the ability to do such searches (and also automatic replacements, if needed)

  • What, no regular expressions?

    I was porting a CGI to use Oracle as a backend instead of
    PostgreSQL. When I couldn't find any regular expression
    facilities in Oracle, I reconsidered and ended up waiting for the
    next release of PostreSQL.
    Still, Oracle was startlingly fast and can do things PostgreSQL
    can't (a VIEW based on a UNION ALL, and a column based on a
    subselect).
    Maybe Sybase has regexps, but I won't find out till I have some
    more spare time.
    null

    JoeD. wrote:
    > Greetings all. I'm having a heckofa problem and I was
    hoping someone on these
    > boards may be able to help. I have 1000s links that I
    need to process and I
    > dread doing this by hand.
    Why don't you simplify your request?
    This is what I have: <a
    href="xxx.php?blah">text</a>
    This is what I want: <a href="xxx.html">text</a>
    It's my guess that this would be very easy, but give us
    examples of
    before and after.
    Mick
    Many of the links are now bad links?and they are
    > 'bad' in a very predictable way as they call contain
    'php?title=' ? so I want
    > to search for the bad link code and simply strip the
    <anchor> tag and leave the
    > containing text as is. My guess is that this shouldn't
    be as difficult as it
    > is, but I could be very wrong here. So, I've done the
    following in the
    > Find/Replace dialog: Search: Specific Tag Selected Tag:
    A With Attribute:
    > HREF Here is where I get confused. The 'with attribute'
    option has '=, <, >,
    > !=' as the optoins. So I tried the equality operator
    using both regular
    > expressoins (*php\?title\=*) and without regular
    expressions(php?title), but no
    > matter what I do, none of the links are being found. I'm
    very new to regex so
    > maybe maybe my code here is bad. I wish there was a
    'containing' option that
    > with attribute exposed, but there isn't. So: do any of
    y'all DW gurus have
    > any ideas about this? I'm pulling what little hair I
    have left out over this.
    > Thanks, Joe
    >

  • What happened to my search function hotkey?

    So i used to be able to open the search function by pressing shftcmdF, but since a recent hard drive format this doesn't work anymore. What happened? How can i fix it?

    It's Command + Option + F. That ⌥ means use the Option key.

  • Match pattern: change regular expression search via front panel?

    Hello,
    I have an application that I am developing which is making use of Serial VISA.
    I am scanning the output of a serial port which is constantly spitting out a long string of data. 
    Data is being pulled from the string with several combinations of SCAN FROM STRING functions and MATCH PATTERN Functions.
    Question:
    How can I use a button or TEXT box on the FRONT PANEL that can change the MATCH PATTERN Functions Regular expression?  
    for example the string may spit out the following:
     Weight\s\s\s\s\s\s\s\s\s\s\s\s-0.00\slb\s\s\s\s\s\s-16\sbits\s+74.40\s\B0F\sCorrected\s\s\s\s\s\s-0.00\slb\s+0.999987\s%\s\r
    in this case the serial device is spitting out data in LB.
    It could be possible for the device to spit out data in KG ... thus I need to change the REGULAR EXPRESSION.
    Thank you for your time

    Hi,
    just a quick example.
    there are other way of doing this but I think the ComboBox is quite an easy one.
    hope this helps
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
    Attachments:
    ComboBox.vi ‏12 KB

  • Non-greedy regular expression search/replace

    i want to be able to do non-greedy regular expressions as
    dreamweaver defaults to greedy and eats all of the match it can
    match.
    Is there an add-on to add a checkbox or soemthing in the
    Search and Replace Dialog for non-greedyness?
    i guess i could throw something in there to match some simple
    expressions like...
    text to search n' replace:
    $Query .= ", dateReceived='".addslashes($dateReceived)."'" .
    ", dateReleased='".addslashes($dateReleased)."'";
    Instead of using this now
    Find: '"\.addslashes\(\$([^\)]*)\)\."'
    Replace: ". dateInsert($$1) ."
    i want to just use this wihout it getting greedy with the .*
    Find: '"\.addslashes\(\$(.*)\)\."'
    Replace: ". dateInsert($$1) ."

    In regular expression, if you want the .* to not be greedy
    you add a '?' after so yo you have '.*?'
    Find: '".addslashes($dateReleased)."'
    Hope that help,
    Chris
    Adobe Dreamweaver Engineering

  • What is regular expression for cheking a set operation

    I want a regular expression for checking the syntax of the set operation given as input
    ex:
    the input should be
    [1,2,3]+[2,3] or [1,2]-[2] or [1,2,3]*[1,2]
    is should check the square bracket and the operator between two set operands

    I think you should code that from scratch. When you validate input, you usually want to tell the user what they did wrong, but a regex will only tell you whether it matches or not.

  • Regular Expression Search for Case Statement in VBA

    Hi,
    I'm having trouble trying to use regular expressions in a case statement. I have a CSV spreadsheet of a server's netstat output and am trying to plot everything into Visio. I have been able to do that, however I'm not trying to expand this capability and
    resuse the same code for many different servers. 
    I have the mainServer variable set as a Variant and in my current example it is set as "INTPXY001" (internal proxy server 001). I have tried different regex statements for the potential to have INTPXY001 - INTPXY999, EXTPXY001 - EXTPXY999, and
    SVCPXY001 - SVCPXY999 in place of the Case "INTPXY001", but nothing I have tried seems to work.
    '========================================
    Set mainServer As Variant
    Set AppVisio = CreateObject("visio.application")
    AppVisio.Visible = True
    AppVisio.Documents.AddEx "", visMSDefault, 0
    AppVisio.Documents.OpenEx "server_u.vss", visOpenRO + visOpenDocked
    mainServer = ActiveSheet.Cells(1, 2) 'sets mainServer to INTPXY001
    With AppVisio.ActiveWindow.Page
    Select Case mainServer
    Case "INTPXY001"
    .Drop AppVisio.Documents.Item("SERVER_U.VSS").Masters.ItemU("Proxy server"), 2.25, 9.25
    Case Else
    .Drop AppVisio.Documents.Item("SERVER_U.VSS").Masters.Item(("Server"), 2.25, 9.25
    End Select
    End With
    '========================================

    You cannot declare variables As Variant in VBScript. All variables in VBScript are implicitly variants.
    If you are asking about VBA (Visual Basic for Applications), then you're not asking in the correct forum.
    -- Bill Stewart [Bill_Stewart]

  • Regular Expression / replace Function Help

    The problem:
    cfset myString = "i am a big boy"
    cfset outputString = replace("i am a big
    boy","i","you","all")
    Wrong Output:
    you am a byoug boy
    Intended Output
    you am a big boy
    How do I achive that output.

    Your first example had only one sentence. That's why I gave
    that answer.
    Anyway for your real question, you need to use regular
    expressions
    #rereplace(myString,"i\s","you ","all")# - will give u
    you am a big boy you am a big boy you am a big boy you am a
    big boy.
    \s looks for a whitespace character after the letter i. So
    that way it will not change the letter i in big

  • OWA_PATTERN regular expressions CHANGE function

    Hello,
    I'm trying to use the CHANGE function to match an expression and then change the matched part of the string. The twist is that I would like to pass the matched part of the string through a function before it is replaced in the original string. Here is an example:
    Pattern: 'C'
    Text: 'CAAACAAAC'
    Resulting text: 'DAAADAAAD'
    Where the 'D' is the result of calling a function. The actual call to the OWA_PATTERN.CHANGE looks something like this:
    OWA_PATTERN.CHANGE(mytext,'C',myfunction(&))
    where the & argument to myfunction is as specified in the ORACLE docs as a reference to what was matched. The line of code doesn't work however. Anyone ever done anything like this?
    Aziz 8)

    SQL> CREATE OR REPLACE FUNCTION myfunction
      2    (p_pattern IN VARCHAR2)
      3    RETURN      VARCHAR2
      4  AS
      5  BEGIN
      6    RETURN CHR (ASCII (p_pattern) + 1);
      7  END myfunction;
      8  /
    Function created.
    SQL> CREATE OR REPLACE PROCEDURE test_pattern
      2    (pattern IN VARCHAR2,
      3     text    IN VARCHAR2)
      4  AS
      5    mytext      VARCHAR2 (256);
      6  BEGIN
      7    mytext := text;
      8    owa_pattern.change (mytext, pattern, myfunction (pattern), 'g');
      9    DBMS_OUTPUT.PUT_LINE ('Pattern:         ' || pattern);
    10    DBMS_OUTPUT.PUT_LINE ('Text:            ' || text);
    11    DBMS_OUTPUT.PUT_LINE ('Resulting text:  ' || mytext);
    12  END test_pattern;
    13  /
    Procedure created.
    SQL> SET SERVEROUTPUT ON
    SQL> EXECUTE test_pattern ('C', 'CAAACAAAC')
    Pattern:         C
    Text:            CAAACAAAC
    Resulting text:  DAAADAAAD
    PL/SQL procedure successfully completed.

  • Feedback / Submit an idea don't Work (Page not found) || Multiline Regular Expression Search

    Hello,
    I reached for some months an idea with a (multiline edeting, regexp search).
    Nice to see this has already been integrated, making me but disappointing is the regex search, in combination with the Multiline Edeting.
    But what it brings me to use the regexp search, when I cant edit all hits.
    In this feature, I would like to point again.
    But unfortunately I cant find the feedback system, and here in the forum I always get the error message, page not found.
    Beautiful would be if both would be patched;)
    For me, the code is currently the "http://www.sublimetext.com/" editor of my choice if Adobe would therefore produce some its functions, edge code would be a real alternative.
    Yet I find Edge Code is not ready for Daily-use.
    Greetings
    Dirk Persky

    Hi Dirk,
    Thanks for reporting the broken links -- we'll look into that.  As Randy said, you're welcome to just post suggestions & issues here in the forum, though.
    Regarding multiline regexp search: that is possible in Edge Code, with some limitations:
    To search multiple files, use the Find in Files command, and then use any regexp containing "\n" -- it will match the newlines correctly.
    To search a single file, right-click the file and chose "Find In..." (it will behave like Find in Files, but limited to that one file)
    Caveat: you can't use the multiline $/^ anchors in your regexp
    Caveat: there's no workaround for using the Replace command with multiline regexps
    The latest Brackets release 0.41 fixes both the caveats listed above -- though you'll still have to use the "Find In..." workaround (or "Replace In..." for Replace).  We eventually plan to further improve this -- you can watch the full multiline search/replace item on our feature backlog for updates.
    Hope that helps,
    - Peter

  • WHAT now with OSX search function?

    Okay, i just searched one of my hard drives for pdf files, and search returns 0 files.
    HOW can this be!? I would use profanity here because it's plainly warranted, but Apple doesn't like that. I think from now on, i'll use the term "OS X" as a substitute for profanity.
    So, I am looking at several pdf files in an OS X folder on this OSX drive, and i know there are more.
    So what the OS X is going on? Thanks.

    You should use spotlight to stop indexing an an hd.  Spotlight puts a file on the hd that says do not index.   I wrote this up awhile ago.
    In an this post I will describe how to perform a classic Mac OS search. You may perform the search with or without the spotlight database. This search falls under the smart folder implementation introduced with Tiger.  I have done all my testing with Mac OS 10.4.11. I assume this will work with any version of Tiger or Leopard. 
    The results will be slightly different with a spotlight database on the partition and without a database on the partition. With a database, you will not see Unix hidden files. You may be able to use all of the spotlight special find features. I did not test much with the spotlight special fields. Without a database, using the special features nulls out the search and the "Search for" field seems to give the same result as using the name field.
    This search technique was obscured by all the hoopla over spotlight. Authors of Tiger books avoided mentioning the Classic search interface. When I looked in Leopard books I noticed some authors put back information on the Classic search interface.
    How do you get to this interface?
    Perform the Classic Mac OS search with a Spotlight database.
    Click on the desktop to access the Finder.
    click on File then click on find.
    Pick what folder you wished to search.  Click on Others... to select a folder. Click on the plus sign to select the folder you wish to search.  Be sure the selected folder in the list is the only one checked.  In the first example I picked:  /Users/mac/Desktop/iMac/z-find/
    The "Search for" field on the first line is used for spotlight. Avoid using this box.
    Click on the plus symbol to the right of an input options. Click on the double arrow to the right of the first option. Go down to the name field.
    You can now search for the contents of a filename. I searched for name contains: bash-
    To see the Classic display format, click on the three line icon which is located on the upper left of the window.  There is a small refresh icon on the lower right of the window.
    !http://farm4.static.flickr.com/3485/3240587496_741476de7b.jpg?v=0!
    I created the z-find folder on my Macintosh-HD then copy it over to my Spotless flash drive.  This means both searches searched for it the same file names.  See below for the list of file names.
    This is the result of the search:
    bash-backup-copy-invisible-attr.html
    bash-backup-inside-bash-copy.html
    bash-backup-inside-bash.html
    bash-backup.html
    bash-batChmod.html
    bash-battery__yellow__4k.html     {labeled with the Yellow attribute}
    bash-copy    {folder}
    bash-copy-invisible-attr    {folder}
    bash-folder__green    {folder and labeled with the Green attribute}
    ping_command-bash-copy.html
    You can create a smart folder to take you directly to the search panel.  Just click on the Save icon to the right of the window near the top. For readers of books, you should look under smart folders.
    !http://farm4.static.flickr.com/3498/3239759755_d5ebbefe05.jpg?v=0!
    There are some downsides. Initially, the search will find both visible and invisible Mac OS files. However, the search seems to get confused between visible and invisible files when you select the visibility option. It seems to get the visible correct when you use visible but when you add invisible things get confused. Sometimes it will find invisible files and sometimes it won't. I used both the Unix invisible files and the Mac OS X visiblity attribute.
    In putting the same search in the upper right-hand-corner spotlight search and in the Search for field, I did not get the same results. The spotlight search returned a 182 items while the with Search for field returned 179 items. The Search for field seemed to miss items in the mail boxes. With the Search for search you could display spotlight results in the classic format.
    I do not know how this works internally. I successfully a search on my fat32 flash drive.
    Perform the Classic Mac OS search without the spotlight database.
    If you turn off spotlight indexing on a volume and delete the spotlight index, then Mac OS Tiger reverts to the prior Mac OS search facility. In the preferences for spotlight, you let searching continued on the partition.
    Here is what I did:
    I installed the spotless application.
    http://www.fixamac.net/software/spot/
    I use spotless to configure spotlight. Click on disabled indexing then click on  delete index files.
    !http://farm4.static.flickr.com/3527/3239751839_c760c46628.jpg?v=0!
    Spotless creates the .Spotlight-V100 directory with the _IndexPolicy.plist and _rules.plist to prevent indexing on the partition.
    mac $ pwd
    /Volumes/Spotless
    mac $ ls -ld .Spotlight-V100
    drwx------   4 mac  staff  136 Jan 22 23:51 .Spotlight-V100
    mac $ ls -l .Spotlight-V100
    total 16
    -rw-------   1 mac  staff  55 Jan 22 23:51 _IndexPolicy.plist
    -rw-------   1 mac  staff  58 Jan 22 23:51 _rules.plist
    _IndexPolicy.plist:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Policy</key>
        <integer>3</integer>
    </dict>
    </plist>
    _rules.plist:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>Spot_Auto</key>
        <integer>1</integer>
    </dict>
    </plist>
    I put these files on my Macintosh-HD and Spotless partitions.
    !http://farm4.static.flickr.com/3363/3219766624_63687ff9a7.jpg?v=0!
    Here is the list of files:
    mac $ pwd
    /Volumes/Spotless/iMac/z-find
    mac $ ls -RaF
    .DS_Store
    .bash-backup-copy-initial-dot-copy.html
    .bash-copy-initial-dot/
    bash-backup-copy-invisible-attr.html
    bash-backup.html
    bash-batChmod.html
    bash-battery__yellow__4k.html
    bash-copy/
    bash-copy-invisible-attr/
    bash-folder__green/
    ./.bash-copy-initial-dot:
    .DS_Store
    bash-backup-inside-bash.html
    ping_command_as_Give.html
    ./bash-copy:
    .DS_Store
    bash-backup-inside-bash-copy.html
    ping_command-bash-copy.html
    ./bash-copy-invisible-attr:
    .DS_Store
    ping_command_as_Give.html
    ./bash-folder__green:
    .DS_Store
    ping_command_as_Give.html
    mac $
    I performed the search for files containing "bash-" in the name field.
    !http://farm4.static.flickr.com/3430/3240587902_171d8d46c3.jpg?v=0!
    This is the result of the search:
    bash-backup-inside-bash-copy.html
    bash-backup.html
    bash-batChmod.html
    bash-battery__yellow__4k.html     {labeled with the Yellow attribute}
    bash-copy    {folder}
    bash-folder__green    {folder and labeled with the Green attribute}
    ping_command-bash-copy.html
    Limitations:
    Does not search in Unix hidden folders. That is folders beginning with a period (.) .
    Sometimes will find files beginning with a period (.).
    Does not find Mac OS invisible files.
    Using the special features nulls out the search.
    The Search for  field seems to give the same result as using the name field.
    Related tips:
    • by Baltwo
    http://www.macosxhints.com/article.php?story=20050501162147222
    If you haven't run Leopard, note that finding stuff is different than Tiger's.
    See http://www.pinkmutant.com/articles/Leopard/leospot.html and my mod to Finder's Find at http://discussions.apple.com/message.jspa?messageID=6725932 for what you can change so you can find stuff excluded by the default structure.
    • "Searching for files by name"
    http://cocoacafe.wordpress.com/2007/06/17/fscatalogsearch/
    Alternatives:
    • FindAnyFile
    "Contrary to Spotlight, it does not use a database but instead uses the file system driver's fast search operations."
    http://apps.tempel.org/FindAnyFile/index.html
    • Use the Terminal find command to list files from multiple directories.
    Macintosh-HD -> Applications -> Utilities -> Terminal
    mac $ find ~/Desktop/iMac/z-find  -iname "*bash-*"  -exec ls -dF  {} \;
    /Users/mac/Desktop/iMac/z-find/.bash-backup-copy-initial-dot-copy.html
    /Users/mac/Desktop/iMac/z-find/.bash-copy-initial-dot/
    /Users/mac/Desktop/iMac/z-find/.bash-copy-initial-dot/bash-backup-inside-bash.ht ml
    /Users/mac/Desktop/iMac/z-find/bash-backup-copy-invisible-attr.html
    /Users/mac/Desktop/iMac/z-find/bash-backup.html
    /Users/mac/Desktop/iMac/z-find/bash-batChmod.html
    /Users/mac/Desktop/iMac/z-find/bash-battery__yellow__4k.html
    /Users/mac/Desktop/iMac/z-find/bash-copy/
    /Users/mac/Desktop/iMac/z-find/bash-copy/bash-backup-inside-bash-copy.html
    /Users/mac/Desktop/iMac/z-find/bash-copy/ping_command-bash-copy.html
    /Users/mac/Desktop/iMac/z-find/bash-copy-invisible-attr/
    /Users/mac/Desktop/iMac/z-find/bash-folder__green/
    mac $
    • findfile
    "Here’s a simple command-line tool which uses FSCatalogSearch to search for files by name.
    usage: findfile -r   "
    Here is where to find: findfile.
    http://cocoacafe.wordpress.com/2007/06/17/fscatalogsearch/
    I am searching file names containing  "bash-" in  the directory "/Users/mac/Desktop/iMac/z-find".
    Macintosh-HD -> Applications -> Utilities -> Terminal
    mac $ ~/findfile -r /Volumes/Macintosh-HD/ "bash-" |\
    additional input:    grep '^/Users/mac/Desktop/iMac/z-find/'
    /Users/mac/Desktop/iMac/z-find/.bash-backup-copy-initial-dot-copy.html
    /Users/mac/Desktop/iMac/z-find/.bash-copy-initial-dot
    /Users/mac/Desktop/iMac/z-find/bash-backup-copy-invisible-attr.html
    /Users/mac/Desktop/iMac/z-find/bash-backup.html
    /Users/mac/Desktop/iMac/z-find/bash-batChmod.html
    /Users/mac/Desktop/iMac/z-find/bash-battery__yellow__4k.html
    /Users/mac/Desktop/iMac/z-find/bash-copy
    /Users/mac/Desktop/iMac/z-find/bash-copy-invisible-attr
    /Users/mac/Desktop/iMac/z-find/bash-folder__green
    /Users/mac/Desktop/iMac/z-find/.bash-copy-initial-dot/bash-backup-inside-bash.ht ml
    /Users/mac/Desktop/iMac/z-find/bash-copy/bash-backup-inside-bash-copy.html
    /Users/mac/Desktop/iMac/z-find/bash-copy/ping_command-bash-copy.html
    • You can use the Terminal to search the contents of a file.
    You need to combine the find command with the grep command. I am searching for the word pdisk where file names containing  "bash-" in  the directory "/Users/mac/Desktop/iMac/z-find".  The symbols {} \; are needed after the word to search. See:
    man find
    man grep
    for cryptic details.
    Macintosh-HD -> Applications -> Utilities -> Terminal
    mac $ find ~/Desktop/iMac/z-find -iname "*bash-*" -type f -exec grep -bil 'pdisk' {} \;
    /Users/mac/Desktop/iMac/z-find/.bash-backup-copy-initial-dot-copy.html
    /Users/mac/Desktop/iMac/z-find/.bash-copy-initial-dot/bash-backup-inside-bash.ht ml
    /Users/mac/Desktop/iMac/z-find/bash-backup-copy-invisible-attr.html
    /Users/mac/Desktop/iMac/z-find/bash-backup.html
    /Users/mac/Desktop/iMac/z-find/bash-copy/bash-backup-inside-bash-copy.html
    Robert

  • Match Regular Expression does not match what Match Pattern does

    I have read through a lot of posts about how Match Pattern does not match what Match Regular Expression will due to not processing some characters.
    However, I found a problem with the other way. A simple Reg-Ex that works in Match Pattern but not Match Regular Expression.
    What I have here is just an example. I want to use Match Regular Expression so I can specify some sub-matches.
    The reg-ex is for: one or more non-numeric characters, a space, one or more numeric characters. At the start of the string.
    How can I get this working in Match Regular Expression? I am working in LabVIEW 2010f2 32 bit. Here is the code snippet and the results:
    Rob
    Solved!
    Go to Solution.

    Robert Cole wrote:
    I think I prefer the ~ for negation since ^ is also used for beginning of the string. But we work with what we have.
    Let me offer you a tip and perhaps defend the honor of the regex a little bit.  One of my favorite features of regexes is the ability to specify character classes (and their negation).  One of the reasons I have to think about the ~ versus ^ is that I rarely use ^ in a regex alternative. 
    Some examples:
    [0-9] = \d (digit)
    [^0-9] = \D (not a digit)
    The equivalent regex for your case is: \D+ \d+

  • Regular Expressions with Call Policy on VCSe

    Hi Guys,
      I am working on firming up the call policy on my VCS Expressway to try to better intercept the SIP spam requests it is getting from internet ip numbers. Right now those spam requets are getting rejected by the loop detection but I want to intercept them before they even do a search on the Expressway. It seems that the call policy rules I create without regular expressions are functioning fine but I don't think I have the syntax correct for the regular expressions.
    The goal of this rule is to reject any incoming SIP request that has a destination alias format of 7 to 17 digits followed by an @VCSe_IP. so for example it would reject the following attempts: 0123456@VCSe_IP and 0123456789101112@VCSe_IP with one rule.
    The policy I created is this: source pattern: unauthenticated user, Destination pattern: \d{7,17}@xx\.xx\.xx\.xx (where xx is the individual octets of the VCSe IP address), Action: reject  
    However the above policy does not seem to be rejecting the calls before they do a search. I have checked the above expression with the check pattern tool on the VCSe and it comes up with a sucessful match when I try the destination alias of a request that made it through, hence my confusion. Any help you guys could provide would be appreciated.
    Thanks,
    Steven                

    Steven,
    Default Zone access rules do not relate to this at all and you can keep those set to 'No'.
    How exactly are you placing the test calls when attempting to verify this?
    I created the following CPL rule on my X7 VCS (With 10.10.10.10 being the IP address of my VCS):
    Source pattern:
    Destination pattern: \d{7,17}@10\.10\.10\.10
    Action: Reject
    I then proceeded with placing a SIP call from an unregistered C20, calling the URI '[email protected]' while running a diagnostics log on my VCS with Network log level set to 'DEBUG', and captured the following in that log:
    Incoming INVITE:
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,598" Module="network.sip" Level="INFO":  Src-ip="10.x.x.x"  Src-port="5060"   Detail="Receive Request Method=INVITE, Request-URI=sip:[email protected], Call-ID=9dd19ad75b1063ecf716461b149e9e2a"
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,598" Module="network.sip" Level="DEBUG":  Src-ip="10.x.x.x"  Src-port="5060"
    SIPMSG:
    |INVITE sip:[email protected] SIP/2.0
    Call processing logic, showing CPL matching:
    2013-02-22T16:03:36+01:00 vcs02 tvcs: Event="Search Attempted" Service="SIP" Src-alias-type="SIP" Src-alias="10.x.x.x" Dst-alias-type="SIP" Dst-alias="sip:[email protected]" Call-serial-number="0886391c-7d01-11e2-adf5-0050569a08fd" Tag="08863aac-7d01-11e2-bd2e-0050569a08fd" Detail="searchtype:INVITE" Level="1" UTCTime="2013-02-22 15:03:36,601"
    2013-02-22T16:03:36+01:00 vcs02 tvcs: Event="Call Attempted" Service="SIP" Src-ip="10.x.x.x" Src-port="5060" Src-alias-type="SIP" Src-alias="sip:10.x.x.x" Dst-alias-type="SIP" Dst-alias="sip:[email protected]" Call-serial-number="0886391c-7d01-11e2-adf5-0050569a08fd" Tag="08863aac-7d01-11e2-bd2e-0050569a08fd" Protocol="UDP" Auth="NO" Level="1" UTCTime="2013-02-22 15:03:36,601"
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,602" Module="network.cpl" Level="DEBUG":  Remote-ip="10.x.x.x"  Remote-port="5060"   Detail="CPL: "
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,602" Module="network.cpl" Level="DEBUG":  Remote-ip="10.x.x.x"  Remote-port="5060"   Detail="CPL:   "
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,602" Module="network.cpl" Level="DEBUG":  Remote-ip="10.x.x.x"  Remote-port="5060"   Detail="CPL: matched "
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,602" Module="network.cpl" Level="DEBUG":  Remote-ip="10.x.x.x"  Remote-port="5060"   Detail="CPL: "
    VCS responds to INVITE with 403 Forbidden:
    2013-02-22T16:03:36+01:00 vcs02 tvcs: UTCTime="2013-02-22 15:03:36,616" Module="network.sip" Level="DEBUG":  Dst-ip="10.x.x.x"  Dst-port="5060"
    SIPMSG:
    |SIP/2.0 403 Forbidden
    As you can see, on my VCS everything seems to work as expected. I'd recommend you capture a similar diagnostics log on your own VCS to check what is different in your test call compared to the output above.

Maybe you are looking for