Small regex question. I have string in the following format:
<b class="ui-tabel-cell-label>Titel</b>TheString that i want
I am creating a mobile website using jquerymobile in which there is a tabel. I get this string when i try to get extract the cell value from this table. Unfortunatlly i didnt find a way to only get the Value of the cell instead i get the "th" element from the tabel aswell. So i thought maybe i can filter it out by using a regular expression.
Could someone provide a regex which filters out the String part from <"b"><"/b"> and everything that is inside and inbetween so i only get the "The String what i want" part.
Asked
Active
Viewed 59 times
-2

TheWandererr
- 514
- 1
- 8
- 34
-
Doesn't make sense because in your title you've stated you want the string in between the `` & `` . – sjsam Aug 31 '16 at 06:58
-
1The title says "Get string between and ". In the question you ask for the string after the ``. Which is it? – SamWhan Aug 31 '16 at 06:58
-
I am sorry fixed it :/ – TheWandererr Aug 31 '16 at 06:59
-
@TheWandererr: is ther somehing after your String? Like a new Tag? – Smartis has left SO again Aug 31 '16 at 07:00
-
Possible duplicate of [Regular expression to match text outside html tags and not between specific tag](http://stackoverflow.com/questions/28647578/regular-expression-to-match-text-outside-html-tags-and-not-between-specific-tag) – Ruud Helderman Aug 31 '16 at 07:03
-
@Smartis no there is nothing after that – TheWandererr Aug 31 '16 at 07:04
-
http://stackoverflow.com/a/1732454/1848654 – melpomene Aug 31 '16 at 07:05
-
Now, your question can be answered like this: *Is there a way* - there are a lot of ways, *using regex* - depends on what you can use: matching or replacing, but the regex will be *very* basic. Check [regexone.com](http://regexone.com) to learn the basics. Without knowing the environment you are working in, it is impossible to provide a clean and efficient solution. – Wiktor Stribiżew Aug 31 '16 at 07:11
-
You are right i will try to provide more info and a more detailed question – TheWandererr Aug 31 '16 at 07:17
-
Updated my question maybe its a bit clearer now – TheWandererr Aug 31 '16 at 07:28
-
@TheWandererr Does my answer not work? Why? – Smartis has left SO again Aug 31 '16 at 09:24
1 Answers
1
If i understand your Question right, the suitable Regex String would be:
(?<=Titel<\/b>)(.*$)
You can check it here out.

Smartis has left SO again
- 5,025
- 4
- 31
- 45