Split a string by two characters
        Posted  
        
            by 
                David
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by David
        
        
        
        Published on 2011-01-09T16:36:35Z
        Indexed on 
            2011/01/09
            16:54 UTC
        
        
        Read the original article
        Hit count: 243
        
JavaScript
|regex
Hi,
Firstable i want to match if a string has the following format: $abc #xyz or $abc .xyz.
The abc and xyz mean only alphanumeric string.
If it's matched then i need to extract the first $abc and the last #xyz, all that using pure javascript and maybe regex.
The pattern is in the following order:
- Dollar Sign
 - Unlimited alphanumeric string
 - space
 - a hash or point
 - Unlimited alphanumeric string
 
Thanks in advance for any help.
© Stack Overflow or respective owner