Hi guys,
does anyone know how to test for a regular expression - i want to include it in a script to make sure the variable is a regexp
cheers (1 Reply)
What is the easiest way to get full address of *.jpg images from html file using perl?
example:
http://farm3.static.flickr.com/2397/2126443111_65a810004c.jpg (1 Reply)
I'd like to know if there is a catchall line for renaming the following patterns:
s01e03 -> 01x03
s4e9 -> 04x09
s10e08 ->10x08
and possibly even:
318 -> 03x18
1002 ->10x02
if its the first 3 or first digit number in the string.
thanks! (0 Replies)
Good Day,
Im new to scripting especially awk and sed. I just would like to ask help from you guys about a sed command that prints the line immediately after a regexp, but not the line containing the regexp.
sed -n '/regexp/{n;p;}' filename
What if my regexp is 3 word or a sentence. Im... (3 Replies)
Hi,
maybe it is stupid question, but is it possible to match expression like this ? :
... // ... ( there is "//" somewhere on the line and on the end of the line there ISN'T "*/" )
I've tried something like : (in SED)
sed 's/\/\/'
but I need "*/" not to be on the end of the line ...... (2 Replies)
Hello,
I'm just starting working on it. I'd like to get a tip
For istance if I have a file like:
a b c
d e f
....
and I wanna get:
1a & 2b & 3c
0d & 8e & 4f
.....
I would like to use sed and come up with a regular expression that works.... (3 Replies)
I have test string value , something like the one below
str='KUAMRJIT|GHOSH'
If I type
echo $str | grep -o -e '\|+'
it doesnt give me anything .
But on the contrary
echo $str | grep -o -e '|'
display the only one pipe character(|) thats there in the string above .
The way I understood Unix... (8 Replies)
I would like to extract "1333 Fairlane" given the below text.
The word "Building:" is always present. The wording between Building and the beginning of the address can be almost anything. It appears the the hyphen is there most of the time.
Campus: Fairlane Business Park
Building:... (9 Replies)
shevek::regexp(3) Library Functions Manual shevek::regexp(3)NAME
shevek::regexp -
Use regular expressions.
SYNOPSIS
#include <regexp.hh>
Public Member Functions
regexp (std::string const &pattern=std::string(), bool case_sensitive=false)
Create a new object, and optionally fill it with a pattern.
regexp & operator= (std::string const &pattern)
Set a pattern, removing the previous one.
regexp (regexp const &that)
Copy a regexp.
regexp & operator= (regexp const &that)
Copy a regexp.
void case_sensitive (bool value=true)
Set whether the evaluation should be case sensitive.
~regexp ()
Destructor, this cleans up internal structures.
bool operator() (std::string const &data)
Check whether the pattern matches a string, and fill internal match structures if it does.
std::string operator[] (unsigned idx) const
Retrieve the value of a subexpression from the last matched string.
bool valid (unsigned idx) const
Test whether a subexpression was filled by the last matching string.
unsigned size () const
Get the number of subexpression.
std::string transform (std::string const &data) const
Transform a string with -codes according to the last matching string.
std::string const & pattern () const
Get the current pattern.
Detailed Description
Use regular expressions.
Member Function Documentation
std::string shevek::regexp::operator[] (unsignedidx) const
Retrieve the value of a subexpression from the last matched string. This throws an exception if the subexpression is not valid.
Author
Generated automatically by Doxygen for libshevek from the source code.
libshevek Fri May 11 2012 shevek::regexp(3)