Sponsored Content
Top Forums Shell Programming and Scripting Need help in string extraction using regular expressions Post 302317228 by akatraga on Monday 18th of May 2009 10:49:55 AM
Old 05-18-2009
Question Need help in string extraction using regular expressions

Hi, I am a new bee to this forum.

I am trying to extract the text after a matching pattern from a url using regular expression.

Ex:
Code:
http://locatlhost:2020/proxy/checkthisout

I want to extract the string after proxy/. I am not familiar with reg ex. Can someone please help?

Last edited by Franklin52; 05-18-2009 at 04:13 PM.. Reason: Replace url tags
 

10 More Discussions You Might Find Interesting

1. Programming

regular expressions in c++

How do I use the regular expressions in c++? (2 Replies)
Discussion started by: szzz
2 Replies

2. Shell Programming and Scripting

regular expressions

Hello, Let say I have a string with content "Free 100%". How can extract only "100" using ksh? I would this machanism to work if instead of "100" there is any kind of combination of numbers(ex. "32", "1238", "1"). I want to get only the digits. I have written something like this: ... (4 Replies)
Discussion started by: whatever
4 Replies

3. UNIX for Dummies Questions & Answers

regular expressions

how to find for a file whose name has all characters in uppercase after 'project'? I tried this: find . -name 'project**.pdf' ./projectABC.pdf ./projectABC123.pdf I want only ./projectABC.pdf What is the regular expression that correponds to "all characters are capital"? thanks (8 Replies)
Discussion started by: melanie_pfefer
8 Replies

4. UNIX for Advanced & Expert Users

Regular Expressions

Hi, below is a piece of code written by my predecessor at work. I'm kind of a newbie and am trying to figure out all the regular expressions in this piece of code. It is really a tough time for me to figure out all the regular expressions. Please shed some light on the regular expressions... (3 Replies)
Discussion started by: ramky79
3 Replies

5. Shell Programming and Scripting

How to extract text from string using regular expressions

Hi, I'm trying to use sed to extract some text and assign it to a variable. Can anyone provide me with some help? it would be much appreciated! I"m looking to extract for example: filename=/output/R34/2005_13_R34_C1042S_T83_CRFTXT_20081015.txt I'm trying to extract the 1042... (9 Replies)
Discussion started by: jtung
9 Replies

6. Shell Programming and Scripting

Need help with Regular Expressions

Hi, In ksh, I am trying to compare folder names having -141- in it's name. e.g.: 4567-141-8098 should match this expression '*-141-*' but, -141-2354 should fail when compared with '*-141-*' simlarly, abc should fail when compared with '*-141-*' I tried multiple things but nevertheless,... (5 Replies)
Discussion started by: jidsh
5 Replies

7. UNIX for Dummies Questions & Answers

Regular expressions

In regular expressions with grep(or egrep), ^ works if we want something in starting of line..but what if we write ^^^ or ^ for pattern matching??..Hope u all r familiar with regular expressions for pattern matching.. (1 Reply)
Discussion started by: aadi_uni
1 Replies

8. Shell Programming and Scripting

Regular Expressions

#!/usr/bin/perl $word = "one last challenge"; if ( $word =~ /^(\w+).*\s(\w+)$/ ) { print "$1"; print "\n"; print "$2"; } The output shows that "$1" is with result one and "$2" is with result challenge. I am confused about how this pattern match expression works step by step. I... (8 Replies)
Discussion started by: DavidHe
8 Replies

9. Shell Programming and Scripting

Regular Expressions

what elements does " /^/ " match? I did the test which indicates that it matches single lowercase character like 'a','b' etc. and '1','2' etc. But I really confused with that. Because, "/^abc/" matches strings like "abcedf" or "abcddddee". So, what does caret ^ really mean? Any response... (2 Replies)
Discussion started by: DavidHe
2 Replies

10. Shell Programming and Scripting

Regular Expressions

Hi Ilove unix and alwyas trying to to learn unix,but i am weak in using regular expressions.can you please give me a littel brief discription that how can i understand them and how to use .your response could lead a great hand in my unix love. (1 Reply)
Discussion started by: manoj attri
1 Replies
eXosip2 REGISTER and Registration Management(3) 		    libeXosip2			   eXosip2 REGISTER and Registration Management(3)

NAME
eXosip2 REGISTER and Registration Management - Functions int eXosip_register_build_initial_register (const char *from, const char *proxy, const char *contact, int expires, osip_message_t **reg) int eXosip_register_build_initial_register_withqvalue (const char *from, const char *proxy, const char *contact, int expires, const char *qvalue, osip_message_t **reg) int eXosip_register_build_register (int rid, int expires, osip_message_t **reg) int eXosip_register_send_register (int rid, osip_message_t *reg) int eXosip_register_remove (int rid) Detailed Description Function Documentation int eXosip_register_build_initial_register (const char *from, const char *proxy, const char *contact, intexpires, osip_message_t **reg) Build initial REGISTER request. Parameters: from SIP url for caller. proxy Proxy used for registration. contact Contact address. (optional) expires The expires value for registration. reg The SIP request to build. int eXosip_register_build_initial_register_withqvalue (const char *from, const char *proxy, const char *contact, intexpires, const char *qvalue, osip_message_t **reg) Build initial REGISTER request with qvalue for contact. Parameters: from SIP url for caller. proxy Proxy used for registration. contact Contact address. (optional) expires The expires value for registration. qvalue The qvalue value for contact header. reg The SIP request to build. int eXosip_register_build_register (intrid, intexpires, osip_message_t **reg) Build a new REGISTER request for an existing registration. Parameters: rid A unique identifier for the registration context expires The expires value for registration. reg The SIP request to build. int eXosip_register_send_register (intrid, osip_message_t *reg) Send a REGISTER request for an existing registration. Parameters: rid A unique identifier for the registration context reg The SIP request to build. (NULL for default REGISTER) int eXosip_register_remove (intrid) Remove existing registration without sending REGISTER. Parameters: rid A unique identifier for the registration context Author Generated automatically by Doxygen for libeXosip2 from the source code. Version 3.1.0 Sun Jun 24 2012 eXosip2 REGISTER and Registration Management(3)
All times are GMT -4. The time now is 11:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy