How can I use regular expresion to validate email adress

how can I use regular expresion to validate email adress.

var emailExp:RegExp = /([a-z0-9._-]+?)@([a-z0-9.-]+)\.([a-z]{2,4})/;

Similar Messages

  • How can I use regular expression to open files of certain types in java?

    Ok this is the problem I am facing:
    I have a command line input of something like "/usr/foo/bar/*.html"
    and there are multiple files in that folder that end with .html.
    How can I use the input to go through/open all the .html files in Java?
    Help would be greatly appreciated thanks!

    Or if you have to do it in java, check out the interfaces java.io.FileFilter and java.io.FileNameFilter
    http://home.tiscali.nl/~bmc88/java/sbook/0128.html
    class HTMLFilter implements FilenameFilter {
        public boolean accept(File dir, String name) {
            return (name.endsWith(".html"));
    }Cheers,
    evnafets

  • How can I use regular expression to match this rule

    I have a String ,value is "<a>1</a><a>2</a><a>3</a>",and want to match other String like "<a>1</a><a>8</a>",if the one of the first string(like "<a>1</a>") will occur in the second string,then will return true.but I don't know how to write the regular expresstion.
    Thx

    Fine fine. :P
    I was a little bored, so here's some code that uses Strings and a StringBuffer (though you could use a String in place of the StringBuffer). Is this perhaps better? :)
              String testMain = "<a>1</a><ab>2</ab><ab>3</ab>";
              String test = "<ab>1</ab><ab>3</ab>";
              String open = "<ab>";
              String close = "</ab>";
              StringBuffer search = new StringBuffer();
              String checkString = null;
              int lastCheck = 0;
              int start = 0;
              int finish = 0;
              boolean done = false;
              while (!done) {
                   start = test.indexOf(open);
                   finish = test.indexOf(close);
                   if ((start == -1) || (finish == -1)) {
                        System.out.println("No more tags to search for.");
                        done = true;
                   else {
                        checkString = test.substring((start + open.length()), finish);
                        search = new StringBuffer();
                        search.append(open);
                        search.append(checkString);
                        search.append(close);
                        if (testMain.indexOf(search.toString()) != -1) {
                             System.out.println("Found value: " + checkString);
                        test = test.substring(finish + close.length());
    Resulting output:
    Found value: 3
    No more tags to search for.
    -G

  • How can I use Windows IAS to validate WLC management users?

    I am having a problem using my Windows IAS radius server to validate management users for my 2112 Wireless Lan Controller.
    I have defined the radius server and it works ok with the policy for validating wireless clients but not for WLC management users.
    The Remote access policy seems to be set up correctly as the event viewer on the server shows:-
    Event Type: Information
    Event Source: IAS
    Event Category: None
    Event ID: 1
    Date:  09/02/2011
    Time:  11:06:06
    User:  N/A
    Computer: UK01DC07
    Description:
    User xxxxxx was granted access.
    Fully-Qualified-User-Name = TRAVEL.OAG.com/Dunstable Admins/xxxxxx
    NAS-IP-Address = 10.10.45.210
    NAS-Identifier = UK03NM01
    Client-Friendly-Name = UK03NM01
    Client-IP-Address = 10.10.45.210
    Calling-Station-Identifier = <not present>
    NAS-Port-Type = <not present>
    NAS-Port = <not present>
    Proxy-Policy-Name = Use Windows authentication for all users
    Authentication-Provider = Windows
    Authentication-Server = <undetermined>
    Policy-Name = UK03NM01 - login
    Authentication-Type = PAP
    EAP-Type = <undetermined>
    But, the WLC log shows:
    *Feb 09 11:06:06.612: %EMWEB-1-LOGIN_FAILED: ews_auth.c:2104 Login failed. User:xxxxxx. Service-Type is not present or it doesn't allow READ/WRITE permission..
    The WLC just returns the login screen
    Any thoughts?
    Thanks in advance
    Richard

    Event viewer shows :
    Event Type: Information
    Event Source: IAS
    Event Category: None
    Event ID: 1
    Date:  10/02/2011
    Time:  08:49:39
    User:  N/A
    Computer: UK01DC07
    Description:
    User xxxxxxxx was granted access.
    Fully-Qualified-User-Name = TRAVEL.OAG.com/Dunstable Admins/xxxxxxxx
    NAS-IP-Address = 10.10.45.210
    NAS-Identifier = UK03NM01
    Client-Friendly-Name = UK03NM01
    Client-IP-Address = 10.10.45.210
    Calling-Station-Identifier =
    NAS-Port-Type =
    NAS-Port =
    Proxy-Policy-Name = Use Windows authentication for all users
    Authentication-Provider = Windows
    Authentication-Server =
    Policy-Name = UK03NM01 - login
    Authentication-Type = PAP
    EAP-Type =
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Data:
    0000: 00 00 00 00               ....   
    and IAS log shows:
    "UK01DC07","IAS",02/10/2011,08:49:39,1,"xxxxxxxx","TRAVEL.OAG.com/Dunstable Admins/xxxxxxxx",,,,,"UK03NM01","10.10.45.210",,0,"10.10.45.210","UK03NM01",,,,,,7,1,"UK03NM01 - login",0,"311 1 10.10.45.254 12/04/2010 23:56:59 1987",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"Use Windows authentication for all users",1,,,,
    "UK01DC07","IAS",02/10/2011,08:49:39,2,,"TRAVEL.OAG.com/Dunstable Admins/xxxxxxxx",,,,,,,,0,"10.10.45.210","UK03NM01",,,,,,2,1,"UK03NM01 - login",0,"311 1 10.10.45.254 12/04/2010 23:56:59 1987",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"Use Windows authentication for all users",1,,,,
    It appears to me that IAS checks and passes the username/password as being valid but this response is ignored by the WLC
    Richard

  • How can I use photoshop Elements 8 to make a DVD to play on a regular TV-DVD? [was:DVD-CD-r]

    How can I use photoshop Elements 8 to make a DVD that will show on a regular TV-DVD set-up

    You can't do this in PSE by itself. I'm assuming you have windows, so output your slideshow as a wmv file and then use Premiere Elements to finalize the disc, if you have that. If not, use whatever you do have (if you can burn DVDs, you have software). Even windows dvd maker will do this.

  • My gf is one of those ppl with the horrible habbit of downloading anything and everything the internet tells her she needs how can i use FF to better protect her from the various virus she downloads on a regular basise

    as i write this i have just restored my gf's computer back to default factory setings and cleaned the HD she has a horrible habbit of downloading anything and everything something tells her to download it her most recent actions caused her to dl a virus along with a prog called "flv tube" ive never heard of it but in less then 5 mins on google i found it to be common with viruses how can i use FF to prevent and or stop her from downloading all this crap so im not always having to fix it for her

    Public Fox: https://addons.mozilla.org/firefox/addon/3911
    Be aware that an extension can easily be bypassed by starting Firefox in [[Safe mode]] or by using the portable Firefox version.

  • How can i use microsoft word on ipad 2

    how can i use the microsoft application on my ipad 2?

    The Pages app is also compatible with MS Word. Unlike some of the others mentioned, the document is actually stored on the iPad as opposed to 'the clouds'. Again, most of those mentioned are cut down versions of MS Word.
    Stand back and look at this constructively; do you need to regularly access to the document from more than one computer/device without the need to keep amending your document on your computer and sending it to your iPad? If so, Documente to Go etc may be the best choice.

  • How can I use my time capsule with windows7

    How can I use my time capsule with windows7?

    This is asked regularly.
    https://discussions.apple.com/message/10978060#10978060
    Look at the more like this. On the right column next to the post.
    Load airport utility for windows.. which will also load bonjour for windows.
    In windows explorer type \\TCname or \\TCipaddress (replacing with the actual values.. names with spaces will give you trouble so change all names in the TC to SMB compatible or actual ip address).

  • I was trying to get the iOS 8.2 on my iPhone 5 but then it stopped and my phone is now on recovery mode I have pictures I need and they did not all fit on iCloud  how can I use the phone again with ALL my pictures and videos without restoring it?

    I was trying to get the iOS 8.2 on my iPhone 5 but then it stopped and my phone is now on recovery mode I have pictures I need and they did not all fit on iCloud  how can I use the phone again with ALL my pictures and videos without restoring it?

    Contacts are designed to be synced to a supported application on the computer or a cloud service.
    Pictures taken with the device are designed to regularly be copied off the device to a computer as would be done with any digital camera.
    If you have failed to use the device as designed it may be too late to recovery anything.
    Is the device regularly backed up to a computer via iTunes?  If so, the most recent backup (when restored to a replacement iOS device) should contain all contacts and pictures as of when the backup was created.

  • How can i use microsoft office on the mAC - what app do i purchase? help?!!

    how can i use microsoft office on the mAC - what app do i purchase? help?!!

    What aspect of Microsoft Office? Office is a suite of programs... Word, Excel, Powerpoint, etc.
    You've got several potential options. Libre Office and Open Office (both googleable) are 'open source,' free, downloadable programmes that will open most MS Office programmes and perform many of the functions of MS Office. Might be an idea to have a look round for reviews (etc) first, to see if they sound like they'll match your needs.
    If you're keen to use the App Store, there's Apple's own suite of programmes: Pages, Numbers and Keynote. They're a word processor, spreadsheet programme, and presentation-type programme with similar functions to Word, Excel and Powerpoint respectively. They're pretty good for most functions, and are better integrated with Macs than MS programmes. They're excellent programmes for what they do, and relatively cheap (about £14 each?).
    But if you're heavily reliant on MS, want ALL the bells and whistles of MS, or need to regularly transfer files between MS programmes on other computers and your laptop / desktop computer, then they might not be the best of ideas. Keynote - IME - can have some difficulties in transferring formatting to Powerpoint.
    Finally, there's MS Office Mac 2011. You can't download MS Office from the App Store, but can order the CDs from most online stores (including Apple's own store). It might be worth price hunting - if you're a student, you can usually find the programmes relatively cheap (£38 at the moment on Software4Students, though you'll need to belong to an academic institution / have a UK .ac email address). Apple's own prices on MS software are unlikely to be the best prices out there (though the product will be identical).
    MS Office includes Word, Excel and Powerpoint in the basic version. The slightly more expensive version (which, I think, is the £38 one on S4S) includes Outlook. Which - IME - is far more of a nuisance than Apple's native Mail programme.
    (I should probably add - I'm an academic. I own both Apple's own programmes, and MS Office 2011. I tend to use the MS programmes more, if only because they're the ones that other people tend to use, and transferring between Apple and MS programmes is a minor inconvenience. Pages also lacks Garamond, my favourite work font. The Apple progs are, however, far more beautifully integrated, and would be MORE than good enough for most users...)

  • How can i use my custom login page in a custom partner application ?

    Dear All,
    I'm trying to customize a login page displayed other than the default sso login page
    by submiting my form to the regular pl/sql procedure : "PORTAL.wwptl_login.login_url"
    but i tried to type the requested partner application url in the browser i got the sso
    login page other than my custom login page. So, How can i use my custom login page in a custom partner application ?
    Regards,
    Mohammed Amin
    [email protected]

    I cannot begin to express my level of frustration. I have been trying to use the composition widget light box display for some time now. I drag the widget to my document. The default widget has three small trigger boxes and a large area made up of a forward and backward button, a background, a text box and a frame for your image.
    My steps have been …
    I click on the little trigger box.
    I click on the frame that holds the main image.
    I go to the fill menu and browse my computer for my image and then click OK.
    IT shows up on my screen. Yay
    I attempt to continue using the next two trigger boxes provided in the widget.
    After that, I add more by clicking on the little plus sign.
    This is where all heck breaks loose.
    Every single time I attempt to add thumbnails, something messes up. When I go to preview, either not all of my main images show up, or it starts with the wrong one, or some are missing. I have looked and looked for help on this and the only thing I can find is how easy it is to create a great portfolio lightbox display.  But as we know, that only works when your thumbnails are the same image as the images in your lightbox. If you want something different, you have to use the composition wizard. I am finding it extremely difficult and confusing to customize.
    Is there an exact sequence you need to use to add images to the slideshow? I am my wits end.

  • I want to upgrade my backup storage space to 10GB but can't. Seems every time I try to "BUY" it never goes anywhere but I notice it is asking An unknown error has occurred. How can I use my re

    I want to upgrade my backup storage space to 10GB but can't.
    Seems every time I try to "BUY" it never goes anywhere but I notice it is asking me for an unknown error has occurred.
    How can I use my regular Apple ID to purchase the upgrade and backup storage space?
    Thanks in advance.
    Mohd

    [email protected] wrote:
    I'm reluctant to post apple ID's in a public support forum, and would prefer to deal with this by private email.  or phone.
    Then contact Apple directly.
    This is a user to user technical support forum.  No one here has access to manage Apple ID's other than their own.
    There is no Apple presence here.

  • How can I use a firewire hard drive on a new Macbook with one USB-C only?

    How can I use a firewire hard drive on a new MacBook with only one USB-C?

    kaz-k is correct about FireWire not being supported by any possible connector or adaptor to USB-C and never will.  However, there is no such thing as a FireWire Hard Drive.  There are only SATA (or if it is a really old one, ATA,) drives in a FireWire enclosure.  If you can remove the drive from the case/enclosure - bust it open somehow if it is a glued-up unit - then the drive can be placed into a regular USB3 enclosure. Then it can connect to the new MacBook via any one of the adaptors Apple sells.

  • How can I use the F11 short cut to go to next field in Microsoft Word 2011 on Macbook Air

    How can I use the F11 short cut to go to next field in Microsoft Word 2011 on Macbook Air?

    The default setting for the function keys is that they do OS X functions.
    To get a regular function hold the fn key and then press the function key.
    This action can be reversed in keyboard preferences.

  • Can I use regular expressions in Java 1.3

    Hi,
    Dose Java 1.3 suport regular expressions?
    How can I use it?
    Thanks.
    bevin ye

    The 1.3 core API doesn't support regular expressions. Hint: There's an item "Since:" in the JavaDoc of most classes that indicates the version it was initially available. If you look it up in the JavaDoc of java.util.regex.Pattern you'll notice that it's value is 1.4.
    But there are several third party libraries that implement regular expressions, 'though I've not used them extensivly, so I can't tell you which one's the most usefull.

Maybe you are looking for

  • How can I add a rescue email it my Apple ID?

    Hi, I forgot my answers for my security questions and I have to add a recovery email to recover  my answers... So how can I add a rescue email to my Apple ID? Thank you   ~ Ediley

  • Tty display problems with nvidia and uvesafb

    I'm trying to get my console to display correctly at 1080p; trying to do so through GRUB was always an absolute nightmare. The console displays fine with nouveau, but nouveau causes the infamous pink line bug, which is simply too irritating to ignore

  • Which one is better for iOS Upgrading Laptos or Desktop PC

    I have used my notebook for upgrading iOS many times.. after long time i used my desktop PC to did that upgrading .. I feel some performance different in my phone... any ideas about that?? or any recopmendation for upgrading .. and whichone is better

  • Assertion: verticalPosition 0

    Hi all I am suporting user that has received error message like this within berowsing some reports results. I am new in BI therefore any help will be realy appreciated 500 Internal Server Error   BEx Web Application Failed to process request; contact

  • PDF to PS: fonts missing with Reader8, ok with Reader5

    Hello, I would appreciate help on this issue with Adobe Reader8 with some files. I am using Adobe Reader on Solaris (sparc) and I use      /path/to/acroread -toPostScript -pairs file.pdf file.ps to create PostScript files.  This works fine for most f