Trina Espinoza <[EMAIL PROTECTED]> wrote:

> How do you create a regular expression that allows you to have files like 
> ths:
> Stuff_Dev
> Greg_Files
> myThings_
> _default
> 
> I wrote this
> 
> s/([A-Za-z]*)/\n$1/g;

Your expression above only asked to get the letters :)   You specified a
character range.  If you want to include the underscore, use the '\w' code
which is equivalent to [a-zA-Z_0-9].  Example:  $thisRec =~ /\w+/

I'm not sure if that is entirely what you want to do since your statement
above indicates you are trying to take the first part before any not alpha
character.

> It only gets the letters, but I am not sure how to write in the underscore.
> 
> Any attemps I have made
> on adding the _ get the wrong results e.g -->s/([A-Za-z]_*)/\n$1/g; 
> <---Didn't work.Created a newline
> right before the underscore.
> 
> Assistance would be much appreciated :)

NSTH*


Jeff

* not sure that helps :)

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to