String equals, matches,, startsWith..endsWith...

I got some problem and it is very weird for me ...
For example:
call method: toCompare("hello");
method: toCompare(String s) {
String sa [] = //get all the filename from a file ...// for examle sa contain hello
// loop
if (sa.equals(s) ...){ // it actually return true // others matches ..startsWiths .....
however ...
when I call method: toCompare(s[0]);
in the method is actaully return false ...
I am passing the same value ...
Please help..
I don't understand why ...
Thanks

>>>
"if (sa.equals(s) ...){ // it actually return true // others matches ..startsWiths .....
however ...
when I call method: toCompare(s[0]);
in the method is actaully return false ...
I am passing the same value ..."
>>>
I'm assuming that by toCompare you mean compareTo...?
if so, compareTo() returns an int, not a boolean. If it returns 0, then the two Objects being compared are equal.

Similar Messages

  • String pattern match

    hi all.
    there is a request :
    get user input string, and use it as string Pattern regular expression, to match the first string in the memory, and print it.
    a JTextField to get user input, and to create regular expression :
    //breg is user input string.
    if( !breg.endsWith("*") ) breg += "*";
    //only alow a-z, A-Z, 0-9, _ , -, . , :, , , \ , /
    String reg = breg.replaceAll("\\*",
    "[a-zA-Z0-9_ \\\\./\\\\:,\\\\-\\\\\\\\]*").
    replaceAll("\\?", "[a-zA-Z0-9_ \\\\./\\\\:,\\\\-\\\\\\\\]");
    then in a loop to check the string in an array tha match this regular expression.
    But when input \ it will not match.
    Is there any problem in my regular expression.
    ??????????

    And the base class is
    public abstract class SearchInputLabel implements KeyListener{
      JWindow dialog = null;
      Component onComponent = null;
      JPanel jPanel1 = new JPanel();
      BorderLayout borderLayout1 = new BorderLayout();
      JLabel jLabelS = new JLabel();
      JTextField jTextField1 = new JTextField();
      Border border1;
       * @param onComponent : it should be a JTable, JTree or JList has been added into
       *                      JViewport in JScrollPane
       *                      else there if it is null, it should be setted after it has been
       *                      added into JViewport in JScrollPane
      protected SearchInputLabel(Component onComponent) {
        this();
        if( onComponent != null ){
          this.onComponent = onComponent;
          onComponent.addKeyListener(this);
      protected SearchInputLabel(){
        try {
          jbInit();
          jTextField1.addKeyListener(this);
        catch(Exception e) {
          e.printStackTrace();
       * @param onComponent : if null, there will do nothing
      public void setOnComponent(Component onComponent){
        if (onComponent != null) {
          this.onComponent = onComponent;
          onComponent.addKeyListener(this);
      private void cancel(){
        dialog.setVisible(false);
        onComponent.requestFocus();
      private void initWin(){
        Window w = (Window) ( (JViewport) onComponent.getParent()).getRootPane().
            getParent();
        dialog = new JWindow(w);
    //    dialog.getContentPane().setBackground(new Color(180, 215, 165));
        dialog.getContentPane().setBackground(new Color(Color.white.getRed() - 50,
            Color.white.getGreen() - 50,
            Color.white.getBlue() - 50));
        dialog.getContentPane().add(jPanel1, BorderLayout.CENTER);
        dialog.addWindowFocusListener(new WindowAdapter(){
          public void windowLostFocus(WindowEvent we){
            cancel();
        KeyStroke escape = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0, false);
        Action escapeAction = new AbstractAction() {
          public void actionPerformed(ActionEvent e) {
            cancel();
        dialog.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(escape,
            "ESCAPE");
        dialog.getRootPane().getActionMap().put("ESCAPE", escapeAction);
      protected void showing(){
        if( dialog == null )
          initWin();
      private void jbInit() throws Exception {
        border1 = BorderFactory.createEmptyBorder(5,10,5,10);
        Border border2 = BorderFactory.createCompoundBorder(
            new LineBorder(Color.BLUE), border1);
        border2 = BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(SystemColor.inactiveCaption,2),BorderFactory.createEmptyBorder(5,10,5,10));
    //    dialog.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    //    dialog.setUndecorated(true);
        jPanel1.setLayout(borderLayout1);
        jLabelS.setRequestFocusEnabled(true);
        jLabelS.setText(DBManager.getString("Search_for_label") + " : ");
        jTextField1.setOpaque(false);
        jTextField1.setBackground(Color.GRAY);
        jPanel1.setOpaque(false);
        jPanel1.setBorder(border2);
        jPanel1.add(jLabelS,  BorderLayout.WEST);
        jPanel1.add(jTextField1,  BorderLayout.CENTER);
        jTextField1.setBorder(null);
    //    jTextField1.setFont(new Font("Dialog", Font.PLAIN, 14));
      protected int getStringWidth(String str, Font f){
        Rectangle2D rec = f.getStringBounds(str,
                                            ( (Graphics2D) dialog.getGraphics()).getFontRenderContext());
        return (int) rec.getWidth();
    }But if there is "\" in table object's value, it can not do well.
    So some one can help me to make it response for "\" character
    Thanks

  • Help with StuckThread in java.lang.String.equals(String.java:619)

    I periodically get a stuck Execute thread on my Weblogic 8.15 server
    during a call to a Stateless Session Bean. When I do thread dumps, the
    thread is always stuck in the same place (in
    java.lang.String.equals(String.java:619) or in the call immediately above it
    java.util.LinkedList.indexOf(LinkedList.java:397)). Even though the thread
    dump indicates that the thread is in a runnable state, if I do multiple
    thread dumps over a period of time, the stack trace always indicates that
    the thread is in the same place. The thread remains stuck until Weblogic is
    restarted. Other client applictions can make session bean calls, but each
    stuck thread seems to still take up lots of CPU time. I have let the stuck
    threads run overnight, and the stack trace from the thread dump always shows
    them executing the same String/LinkedList code. In each case, our code is
    trying to iterate over a collection
    Does anybody know what could cause this problem, and how to fix it? I get
    StuckThreadMaxTime errors in the log:
    ####<Dec 4, 2005 10:47:25 AM EST> <Error> <WebLogicServer> <nybill>
    <myserver> <weblogic.health.CoreHealthMonitor> <<WLS Kernel>> <>
    <BEA-000337> <ExecuteThread: '4' for queue: 'weblogic.kernel.Default' has
    been busy for "1,263" seconds working on the request
    "ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl", which
    is more than the configured time (StuckThreadMaxTime) of "1,200" seconds.>
    Here are some stack traces from different thread dumps (I have the full
    thread dumps if necessary):
    "ExecuteThread: '10' for queue: 'weblogic.kernel.Default'" daemon prio=5
    tid=0x7720eb98 nid=0xd68 runnable [571f000..571fdb0]
    at java.lang.String.equals(String.java:619)
    at java.util.LinkedList.indexOf(LinkedList.java:398)
    at java.util.LinkedList.contains(LinkedList.java:176)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getDailyCallSummary(XMLBillCr
    eation.java:1992)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getGraphs(XMLBillCreation.jav
    a:1931)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getLocations(XMLBillCreation.
    java:2618)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.createXMLBill(XMLBillCreation
    .java:236)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSessionEJB.getBillAsXml(BillAdmi
    nSessionEJB.java:341)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl.getBillAsX
    ml(BillAdminSession_uli3xb_EOImpl.java:100)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl_WLSkel.inv
    oke(Unknown Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:363)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
    0)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    "ExecuteThread: '22' for queue: 'weblogic.kernel.Default'" daemon prio=5
    tid=0x772538d0 nid=0xe24 runnable [497f000..4fdb0]
    at java.lang.String.equals(String.java:619)
    at java.util.LinkedList.indexOf(LinkedList.java:398)
    at java.util.LinkedList.contains(LinkedList.java:176)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getMostExpensiveOrLongestCall
    s(XMLBillCreation.java:1892)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getTopTenReport(XMLBillCreati
    on.java:1798)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getTopTenReports(XMLBillCreat
    ion.java:1751)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getLocations(XMLBillCreation.
    java:2612)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.createXMLBill(XMLBillCreation
    .java:236)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSessionEJB.getBillAsXml(BillAdmi
    nSessionEJB.java:341)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl.getBillAsX
    ml(BillAdminSession_uli3xb_EOIm.java:100)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl_WLSkel.inv
    oke(Unknown Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:363)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
    0)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    "ExecuteThread: '21' for queue: 'weblogic.kernel.Default'" daemon prio=5
    tid=0x76afb060 nid=0x498 runnable [48af000..48fdb0]
    at java.lang.String.equals(String.java:619)
    at java.util.LinkedList.indexOf(LinkedList.java:398)
    at java.util.LinkedList.contains(LinkedList.java:176)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getMostFrequentlyCalledNumber
    sOrCitiesReport(XMLBillCreation.java:1839)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getTopTenReport(XMLBillCreati
    on.java:1772)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getTopTenReports(XMLBillCreat
    ion.java:1743)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getLocations(XMLBillCreation.
    java:2612)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.createXMLBill(XMLBillCreation
    .java:236)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSessionEJB.getBillAsXml(BillAdmi
    nSessionEJB.java:341)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl.getBillAsX
    ml(BillAdminSession_uli3xb_EOImp.java:100)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl_WLSkel.inv
    oke(Unknown Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:363)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
    0)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    The code in LinkedList that it seems to be executing is the following:
    Line#
    397 for (Entry e = header.next; e != header; e = e.next) {
    398 if (o.equals(e.element))
    399 return index;
    400 index++;
    401 }
    I am running Weblogic 8.15 on Windows 2000.
    Thanks for any help,
    - Don

    njb7ty wrote:
    I suggest dropping that example program and concentrating on reading a book on Java such as 'Head First in Java'. Otherwise, you will spend a lot of time trying to get something to work and gain little value from it.Likewise... Jumping into reflections before you can [read a stack-trace|http://www.0xcafefeed.com/2004/06/of-thread-dumps-and-stack-traces/] is like signing up a toddler for the New York Marathon... it's probably simply beyond your skill level... so step back... go read a book, do some tutorials, get your head around just the process of the designing, writing, compiling, running, and debugging java programs... and what the different diagnostics mean... Then, equipped with your nose-clip and your trusty stone ;-) you contemplate leaping into the deep end ;-)
    Cheers. Keith.

  • Test string equals syntax in configure.ac

    Hi all, I recently started a project that uses autoconf, and many examples around the place use the following syntax for string equality tests:
    if test "x$str" = "xyes"; then ...
    I was wondering why this is used as opposed to
    if test "$str" = "yes"; then ...
    which seems a bit more elegant and in plain bash seems to work fine (even with empty strings etc). Anyone know the reason why it is usually done the first way and not the second?

    but autoconf was made for POSIX sh (not sure what that supports exactly), and so many developers try to be overly cautious. I know we are not with the linux-only product.s.
    it might also be a holdover from people writing tests without the quotes, like  if x$var = xyes; then ...
    if you write without the x and $var is an empty string, you'll get a syntax error

  • Match string and retrieve part of string from match

    Hi,
    I'm trying to parse a html-page to retrieve a certain value.
    The string should match some pattern. Then I want to retrieve a part of the string from the match. In my example case: XXX.
    String string2Match = "    <input type=\"text\" name=\"match\" value=\"XXX\"       ";
    String regex = ".*<input type=\"text\" name=\"match\" value=\"\\w*\".*";
    Pattern pattern = Pattern.compile(regex);
    Matcher matcher = pattern.matcher(string2Match);
    if (matcher.matches()) {
       // in this case I want to retrieve a part of the string from the match. here: XXX.
    }Can this be done, without parsing the matcher.group()-findings again.
    Thanks
    Jonny

    user11365587 wrote:
    My question was meant for strings in general.Then go here:
    http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html
    and look for groups.
    You will end up by something like:Matcher matcher = Pattern.compile("[a-z]{2}(\\d+)(.*)").matcher("ab1234xy56");
    assertEquals("ab1234xy56",matcher.group(0));
    assertEquals("1234",matcher.group(1));
    assertEquals("xy56",matcher.group(2));bye
    TPD

  • Support for .startsWith() & .endsWith()?

    Hi,
    This is the FAQ that I referred in my post titled "Searchable news
    archive?":
    Does Kodo currently supports query filter expressions that include
    ".startsWith()", ".endsWith()"? It's not listed as a known bug or
    limitation.
    Thanks,
    Matthew

    My bad: <stupidUserError><shellGotcha /></stupidUserError>
    "Joe Mannering" <[email protected]> wrote in message
    news:9tjdok$dn2$[email protected]..
    We are using .startWith() - this works fine.
    Joe.
    Matthew T. Adams wrote in message <9tgt1g$ujq$[email protected]>...
    Hi,
    This is the FAQ that I referred in my post titled "Searchable news
    archive?":
    Does Kodo currently supports query filter expressions that include
    ".startsWith()", ".endsWith()"? It's not listed as a known bug or
    limitation.
    Thanks,
    Matthew

  • String equal method Vs Object equal method.

    hello, Can anybody explain me difference between equal method in String class and equal method in Object class. We have equal method in object classes. and object class is the super class of all classes, so why we need equal method in String class.

    RGEO wrote:
    hello, Can anybody explain me difference between equal method in String class and equal method in Object class. We have equal method in object classes. and object class is the super class of all classes, so why we need equal method in String class.Because "equal" means different things for different objects. For a String, "equal" would mean that both Strings being compared have the exact same characters, in the same sequence. For an Integer, "equals" would mean that both objects have the same integer value.

  • Compareto versus equals performance for strings equality

    Hi
    Just wanted to know whether compareto and equals method performance for checking whether the two strings are equal or not .
    Which one is good with respect to bytecode , speed performance.
    Im not asking for the difference, only asking which one is good to use most number of times for comparing two strings for equilaty.
    Thanks.

    Hi
    Ya they are both for different purposes. No doubt.
    t which one is faster among the two for string
    equality?
    compareto or equals.
    thanksHis point is that it doesn't matter. You shouldn't worry about optimization for small details like this. Unless you are profiling your code and find a large slowdown with that code, then don't worry about their performance. Use the one that best suits your purpose. If you want to know if they're equal, use equals(), if you want to know their order, use compareTo().

  • String equality

    Hi,
    I've recently had a problem with string equality. My problem is the following:
    element.getName() == String2
    (getName() method returns a string)
    returns false, but both strings really seem to be equal, that is:
    System.out.println(String1 +"/"+ String2 +"=" + (String1 == String2));
    prints
    LAMES/LAMES=false
    which seems pretty strange to me.
    I searched both is the javadocs and in the tutorial, but I did not find any solution to my problem. How that 2 strings containing the same Characters are not equal.
    Nicolas

    This has been stated NUMEROUS times throughout the forums...
    == compares Objects (two String Objects will most likely NOT be equal, even if both contain the same characters in the same sequence)
    String.equals(...) compares the equality of the contents of the Strings

  • Doubt in String Equals

    Doubt in String Equals_
    if(filePath != "") {
         getExcelData(filePath);
    }same as
    if(!filePath.equals("")) {
         getExcelData(filePath);
    }The can both be used interchangeably right ?

    kajbj wrote:
    (You should really open a textbook and read about Strings, or google)fortunatly i know this :)
    if you do
    String str = "abc"
    str =="abc" // will always return true.
    but str==(new String("abc")) // will always return false.
    But as per the query posted i am referring to the first case :)

  • Split a string using Match Pattern function

    I am trying to split a response string from a climate chamber into different parts. The string goes something like this: 0030.0\s0034.6\s0080.0\s0083.4. I am using the match pattern function to split the string using \s as the search string. But it is not splitting the string as required. If I use only \ , its working fine. Can anyone please suggest why \s is not being recognised as a part of the input string?
    Subhro.
    Solved!
    Go to Solution.

    Is the string you show in normal display mode or in \ codes display mode?
    Anyway, if you need to match a '\' character you'll have to mask it using \, so the match string would be '\\s' to match '\s'.
    Alternatively you could use spreadsheet string to array with the correct delimiter. For the data you show this would work perfectly.

  • On String Equality (using ==)

    Hello. I am trying to create a program that will merge sentences on their first similar word occurence, i.e.:
    Given "good day. i would like to see you at the office"
    and "how are you feeling today?"
    It will produce "good day. i would like to see you feeling today".
    If there are no similar words, the program will just concatenate the Strings.
    I tested the examples above and I got "good day. i would like to see you at the office how are you feeling today". Obviously, something's wrong.
    So I fiddled around my code putting printlns here and there. Then I found out that my comparison loops doesn't stop. Equality ( == ) always evaluates to false.
    On my tester class, I tried the following:
    String intro = "good day. i would like to see you at the office";
    String outtro = "how are you feeling today?";
    String[] fooArray = intro.split(" ");
    String[] barArray = intro.split(" ");
    String foo = fooArray[7];
    String bar = barArray[2];
    System.out.println("Is foo equal to bar? " + foo == bar);The abovementioned code returned false.
    Then I tried the following
    String intro = "good day. i would like to see you at the office";
    String outtro = "how are you feeling today?";
    String[] fooArray = intro.split(" ");
    String[] barArray = intro.split(" ");
    String foo = fooArray[7];
    String bar = barArray[2];
    System.out.println("How about chars? " + foo.charAt(0) == bar.charAt(0));This time around, it returned true.
    So I'm guessing that maybe I should just create a function that will loop through the chars of the String and compare them.
    However, I am bothered by how Java handled foo == bar . Can someone explain to me why this happened? Is there a workaround to this one or should I always create a function that loops through chars everytime I want to compare Strings?
    Thanks!

    == compares references for equality. When you want to compare two Object instances for equality you use the equals method. This applies not only to String but any other type of Object..

  • String equal?

    I have some instrument which communicate with PC via RS232. So I use VISA write, read...
    It's working OK, but have next problem
    I want to compare two strings, one is constant other one will come out from VISA read. If I use indicator, it's show "hex"(for example 3E04 4B73 ) value from VISA, but if I use same wire to "equal?" to compare two strings it's return strange values...
    Let's see all together to see what's my problem:
    Rookie; LV 2011 on WIN 7
    Solved!
    Go to Solution.

    I don't know the definition of "strange values", especially for a boolean that can only be false or true. Can you explain?
    What is the display format of the diagram constant? (normal or hex?)
    Once you have the right valuue in the indicator, you can right-click the terminal and "create constant". Now you have a diagram constant that is guaranteed to be identical to the current value of the indicator.
    LabVIEW Champion . Do more with less code and in less time .

  • VLOOKUP on INFOPATH EQUAL MATCH

    Hi,
    I am executing a Vlookup in Infopath which I need to operate on a sharepoint.
    I have a data connection list contianing different codes, e.g.
    LIST 1, account 1, Codes: 27098, 8556, 0976
    LIST 2, account 2, Codes: 2709, 6789, 6543.
    In the main list, I am trying to get the correct account Name for those Main List-codes which match the Data connection List codes.
    To do that, I set up the Vlookup on the main list as retriving datas from the column "Account" in the Data connection list, filtering by Code in data Connection List
    containing the code entered in the Main List.
    Nevertheless, what happens is that if the code I enter in the Main List is 2709 (as in the above example), the Vlookup gives me as a result "Account 1", in fact, the code 27098 does contain the code 2709.
    I tried to filter the 2 codes to be equal, but at that stage the Vlooup doesn't work at all.
    Can you please help?
    Many thansk

    Hi martinaalg, how do you have your Vlookup set up? Are you using EXACT or true to validate?
    cameron rautmann

  • Complex string pattern match/sort question for mapping data - Exchange Enable mailbox use case

    Hi,  Im trying to do a runbook to Enable mailbox for a user.  Our Exchange Admin uses a rule/formula to allocate the mailbox database based on users first name and this is what I am having difficulty replicating in Orchestrator to add the correct
    data in the Database property of Enable Mailbox activity.
    The Rule exchange uses, takes up to the first 3 chars of forename and based on an alphabetic sort, it will allocate to a particular mailbox db (we have a quite large Exchange Org with 20k users so hes tried to allocate about 500 users per mailboxDB).  so
    for example User Forename A-ALI = DB1, ALL-ANG = DB2, ANH-ANY=DB3,AO-BER=DB4 etc etc.
    So I was hoping someone could advise of some string comparison activities native in Orchestrator or maybe done as last resort in powershell (as I'm not great in powershell) to provide a map of the published data for forname to appropriate mailbox matrix.
    Any help on this would be much appreciated...
    Cheers

    You could use the built in Mid function [Mid(‘Return subset from this string’,1,3)] to get the first three letters of their name and honestly I would send
    this to the Run .Net Script activity using powershell myself and do a select case to get it to publish to the database the name of the database server.
    I am all for using  built in activities to do things in Orchestrator but you are going to quickly find that you need to have good powershell scripting skills to extend the tools beyond the capabilities of the built in activities.
    Vaughn

Maybe you are looking for