I recently got into a friendly argument with Ghoti about what constitutes a regular expression in the comments to my answer to this question. I claimed that the following is a regular expression:
`[Rr]eading[Tt]est[Dd]ata`
Ghoti disagreed, claiming it is a file glob instead.
Hi,
what ?* means in sh script?
I know that ? is equivalent to at least one appearance of a preceding expression and * is equivalent to at least one appearance of preceding expression but I have difficulties with a way in which I should interpret following pattern:
-?*
I would expect that it should match expressions like -, --, --- because I read it as follows:
-?
I'd like to find all of the files in my home folder on Linux (Ubuntu, in this case) that contain a match a particular regular expression. Is there a simple Unix command that I can use in order to do this?
For example, I'd like to find all of the files in my home folder that contain a match of the following regex (here, using Javascript-style notation): ((R|r)eading(T|t)est(D|d)ata)
I'm trying to use find with the regex option. However my regular expression only captures the basename of the file. Is there a reference to the "directory find is currently in" I can use in my regular expression so that I don't have to account for it by means of a leading .*?
Synopsis
case in
[(] ) ;; # or ;& or ;;& in Bash 4
[(] ) ;;
[(] | ) ;;
...
[(] ) [;;]
esac
Description
The case-statement can execute commands based on a pattern matching decision. The word is matched against every pattern and on a match, the associated list is executed. Every commandlist is terminated by ;;, this rule is optional for the very last commandli…
Goodmorning,
I've some problem in using regular expression in a VIM syntax configuration file.
I've need to match a string as <<< some to match >>> so that it matches only some to match .
With standard regular expression i know that for this goal works fine the regex:
(?<=<{3}).*(?=>{3})
but in Vim syntax files this doesn't work.
Hi Everybody!
I need some help with a regular expression in Perl that will match files named messages, but also files named message.1, message.2 and so on.
Synopsis
case in
[(] ) ;; # or ;& or ;;& in Bash 4
[(] ) ;;
[(] | ) ;;
...
[(] ) [;;]
esac
Description
The case-statement can execute commands based on a pattern matching decision. The word is matched against every pattern and on a match, the associated list is executed. Every commandlist is terminated by ;;, this rule is optional for the very last commandli…
Synopsis
case in
[(] ) ;; # or ;& or ;;& in Bash 4
[(] ) ;;
[(] | ) ;;
...
[(] ) [;;]
esac
Description
The case-statement can execute commands based on a pattern matching decision. The word is matched against every pattern and on a match, the associated list is executed. Every commandlist is terminated by ;;, this rule is optional for the very last commandli…